If your ...\LDAPConfigs\default.php is correct you can use the following patch to update the user information on every successful login.
In module \modules\Users\authentication\LDAPAuthenticate\LDA PAuthenticateUser.php change the statements
Code:
//user already exists use this one
if($row = $GLOBALS['db']->fetchByAssoc($dbresult)){
if($row['status'] != 'Inactive')
return $row['id'];
else
return '';
} to
Code:
//user already exists use this one
if($row = $GLOBALS['db']->fetchByAssoc($dbresult)){
if($row['status'] != 'Inactive')
{
$user = new User();
$user->retrieve($row['id']);
foreach($this->ldapUserInfo as $key=>$value){
$user->$key = $value;
}
$user->save();
return $row['id'];
}
else
return '';
}
Bookmarks