english/plugins/system/languagefilter/languagefilter.php
/**
	 * after store user method
	 *
	 * Method is called after user data is stored in the database
	 *
	 * @param	array		$user		Holds the new user data.
	 * @param	boolean		$isnew		True if a new user is stored.
	 * @param	boolean		$success	True if user was succesfully stored in the database.
	 * @param	string		$msg		Message.
	 *
	 * @return	void
	 * @since	1.6
	 */
after store user method
Method is called after user data is stored in the database

@param       array           $user           Holds the new user data.
@param       boolean         $isnew          True if a new user is stored.
@param       boolean         $success        True if user was succesfully stored in the database.
@param       string          $msg            Message.


after store user method Method is called after user data is stored in the database @param array $user Holds the new user data . @param boolean $isnew True if a new user is stored . @param boolean $success True if user was succesfully stored in the database . @param string $msg Message .
public function onUserAfterSave($user, $isnew, $success, $msg)
	{
		if ($this->params->get('automatic_change', '1')=='1' && key_exists('params', $user) && $success)
		{
			$registry = new JRegistry();
			$registry->loadString($user['params']);
			$lang_code = $registry->get('language');
			if (empty($lang_code)) {
				$lang_code = self::$default_lang;
			}
			$app = JFactory::getApplication();
			if ($lang_code == self::$_user_lang_code || !isset(self::$lang_codes[$lang_code]))
			{
				if ($app->isSite())
				{
					$app->setUserState('com_users.edit.profile.redirect',null);
				}
			}
			else
			{
				if ($app->isSite())
				{
					$app->setUserState('com_users.edit.profile.redirect','index.php?Itemid='.$app->getMenu()->getDefault($lang_code)->id.'&lang='.$lang_codes[$lang_code]->sef);
					self::$tag = $lang_code;
					$conf = JFactory::getConfig();
					$cookie_domain 	= $conf->get('config.cookie_domain', '');
					$cookie_path 	= $conf->get('config.cookie_path', '/');
					setcookie(JUtility::getHash('language'), $lang_code, time() + 365 * 86400, $cookie_path, $cookie_domain);
				}
			}
		}
	}
public function onUserAfterSave ( $ user , $ isnew , $ success , $ msg ) { if ( $ this -> params -> get ( 'automatic_change' , '1' ) == '1' && key_exists ( 'params' , $ user ) && $ success ) { $ registry = new JRegistry ( ) ; $ registry -> loadString ( $ user [ 'params' ] ) ; $ lang_code = $ registry -> get ( 'language' ) ; if ( empty ( $ lang_code ) ) { $ lang_code = self :: $ default_lang ; } $ app = JFactory :: getApplication ( ) ; if ( $ lang_code == self :: $ _user_lang_code || ! isset ( self :: $ lang_codes [ $ lang_code ] ) ) { if ( $ app -> isSite ( ) ) { $ app -> setUserState ( 'com_users.edit.profile.redirect' , null ) ; } } else { if ( $ app -> isSite ( ) ) { $ app -> setUserState ( 'com_users.edit.profile.redirect' , 'index.php?Itemid=' . $ app -> getMenu ( ) -> getDefault ( $ lang_code ) -> id . '&lang=' . $ lang_codes [ $ lang_code ] -> sef ) ; self :: $ tag = $ lang_code ; $ conf = JFactory :: getConfig ( ) ; $ cookie_domain = $ conf -> get ( 'config.cookie_domain' , '' ) ; $ cookie_path = $ conf -> get ( 'config.cookie_path' , '/' ) ; setcookie ( JUtility :: getHash ( 'language' ) , $ lang_code , time ( ) + 365 * 86400 , $ cookie_path , $ cookie_domain ) ; } } } }
after store user method
 Method is called after user data is stored in the database
after store user method Method is called after user data is stored in the database
// Create a cookie