mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-24 14:58:52 +01:00
need to use own authentication method, to be able to auth user forced to change password and need to always recheck flag, if user are forced to change password, as otherwise he will be prompt again after changing it
This commit is contained in:
parent
526c938eec
commit
b54aef66e4
@ -76,11 +76,11 @@ class auth
|
||||
// retrieve the timestamp regarding the last change of the password from auth system and store it with the session
|
||||
static $alpwchange_val;
|
||||
static $pwdTsChecked;
|
||||
if (is_null($pwdTsChecked) && is_null($alpwchange_val))
|
||||
if (is_null($pwdTsChecked) && is_null($alpwchange_val) || (string)$alpwchange_val === '0')
|
||||
{
|
||||
$alpwchange_val =& egw_cache::getSession('phpgwapi','auth_alpwchange_val'); // set that one with the session stored value
|
||||
// initalize statics - better readability of conditions
|
||||
if (is_null($alpwchange_val))
|
||||
if (is_null($alpwchange_val) || (string)$alpwchange_val === '0')
|
||||
{
|
||||
$backend_class = 'auth_'.$GLOBALS['egw_info']['server']['auth_type'];
|
||||
$backend = new $backend_class;
|
||||
|
@ -207,7 +207,7 @@ class auth_ads implements auth_backend
|
||||
$username = $GLOBALS['egw']->accounts->id2name($account_id);
|
||||
}
|
||||
// Check the old_passwd to make sure this is legal
|
||||
if(!$admin && !$adldap->authenticate($username, $old_passwd))
|
||||
if(!$admin && !$this->authenticate($username, $old_passwd))
|
||||
{
|
||||
//error_log(__METHOD__."() old password '$old_passwd' for '$username' is wrong!");
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user