Skip to content

Commit

Permalink
Fixed issue #7329: Login error notice: langcode param not defined if …
Browse files Browse the repository at this point in the history
…authentication by webserver is activated
  • Loading branch information
c-schmitz committed Mar 8, 2013
1 parent ac80450 commit dbad629
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
4 changes: 2 additions & 2 deletions application/controllers/admin/authentication.php
Expand Up @@ -299,13 +299,13 @@ private function _setSessionData($user)
*/
private function _setLanguageSettings($user)
{
if (Yii::app()->request->getPost('loginlang') != 'default')
if (Yii::app()->request->getPost('loginlang','default') != 'default')
{
$user->lang = sanitize_languagecode(Yii::app()->request->getPost('loginlang'));
$user->save();
$sLanguage=$user->lang;
}
else if ($user->lang=='auto')
else if ($user->lang=='auto' || $user->lang=='')
{
$sLanguage= getBrowserLanguage();
}
Expand Down
2 changes: 1 addition & 1 deletion application/models/Tokens_dynamic.php
Expand Up @@ -18,7 +18,7 @@ class Tokens_dynamic extends LSActiveRecord
{
protected static $sid = 0;

public $emailstatus='OK'; // Defaul value for email status
public $emailstatus='OK'; // Default value for email status

/**
* Returns the static model of Settings table
Expand Down
11 changes: 11 additions & 0 deletions application/models/User.php
Expand Up @@ -15,6 +15,12 @@

class User extends CActiveRecord
{
/**
* @var string Default value for user language
*/
public $lang='auto';


/**
* Returns the static model of Settings table
*
Expand Down Expand Up @@ -86,6 +92,11 @@ public function getAllRecords($condition=FALSE)

return $data;
}
/**
*
*
* @param mixed $postuserid
*/
function parentAndUser($postuserid)
{
$user = Yii::app()->db->createCommand()
Expand Down

0 comments on commit dbad629

Please sign in to comment.