* API: for new (autocreated) accounts, set ->can change password<- flag only if admin requires his users to change their passwords regularily (admin->site configuration->set recurrent forced password change)

This commit is contained in:
Klaus Leithoff 2012-06-29 11:38:58 +00:00
parent 09997309ab
commit fa90c1066c

View File

@ -869,7 +869,17 @@ class accounts
// at login-time only the hooks from the following apps will be called
'order' => array('felamimail','fudforum'),
),False,True); // called for every app now, not only enabled ones
// set the appropriate value for the can change password flag (assume users can, if the admin requires users to change their password)
$data['changepassword'] = (bool)$GLOBALS['egw_info']['server']['change_pwd_every_x_days'];
if(!$data['changepassword'])
{
$GLOBALS['egw']->acl->add_repository('preferences','nopasswordchange',$data['account_id'],1);
}
else
{
$GLOBALS['egw']->acl->delete_repository('preferences','nopasswordchange',$data['account_id']);
}
unset($data['changepassword']);
// set memberships if given
if ($memberships)
{