english/plugins/system/languagefilter/languagefilter.php
/**
	 * This method should handle any login logic and report back to the subject
	 *
	 * @param	array	$user		Holds the user data
	 * @param	array	$options	Array holding options (remember, autoregister, group)
	 *
	 * @return	boolean	True on success
	 * @since	1.5
	 */
This method should handle any login logic and report back to the subject
@param       array   $user           Holds the user data
@param       array   $options        Array holding options (remember, autoregister, group)

@return      boolean True on success
@since       1.5
This method should handle any login logic and report back to the subject @param array $user Holds the user data @param array $options Array holding options ( remember autoregister group ) @return boolean True on success @since 1 . 5
public function onUserLogin($user, $options = array())
	{
		$app = JFactory::getApplication();
		if ($app->isSite())
		{
			if ($this->params->get('automatic_change', 1)) {
				$lang_code = $user['language'];
				if (empty($lang_code)) {
					$lang_code = self::$default_lang;
				}
				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 onUserLogin ( $ user , $ options = array ( ) ) { $ app = JFactory :: getApplication ( ) ; if ( $ app -> isSite ( ) ) { if ( $ this -> params -> get ( 'automatic_change' , 1 ) ) { $ lang_code = $ user [ 'language' ] ; if ( empty ( $ lang_code ) ) { $ lang_code = self :: $ default_lang ; } 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 ) ; } } }
This method should handle any login logic and report back to the subject
 @param       array   $user           Holds the user data
 @param       array   $options        Array holding options (remember, autoregister, group)
This method should handle any login logic and report back to the subject @param array $user Holds the user data @param array $options Array holding options ( remember autoregister group )
// Create a cookie