return true;
}
+ /* Grab the current language before we destroy the session. */
+ $language = $registry->preferredLang();
+
/* Destroy any existing session on login and make sure to use a
* new session ID, to avoid session fixation issues. */
if (!$registry->getAuth()) {
$registry->setAuth($userId, $credentials, array(
'app' => $this->_app,
- 'change' => $this->getCredential('change')
+ 'change' => $this->getCredential('change'),
+ 'language' => $language
));
if ($this->_base &&
* 'change' - (boolean) Whether to request that the user change their
* password.
* DEFAULT: No
+ * 'language' - (string) The preferred language.
+ * DEFAULT: null
* </pre>
*/
public function setAuth($authId, $credentials, array $options = array())
$GLOBALS['injector']->getInstance('Horde_Core_Factory_Prefs')->clearCache();
$this->loadPrefs();
- $this->setLanguageEnvironment($GLOBALS['prefs']->getValue('language'), $app);
+ $this->setLanguageEnvironment(isset($options['language']) ? $options['language'] : null, $app);
}
/**