mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 14:41:29 +01:00
for new (autocreated) accounts, set ->can change password<- appropriately, move section before processing of hooks
This commit is contained in:
parent
fa90c1066c
commit
45fe6d9fea
@ -862,13 +862,6 @@ class accounts
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// call hook to notify interested apps about the new account
|
||||
$GLOBALS['hook_values'] = $data;
|
||||
$GLOBALS['egw']->hooks->process($data+array(
|
||||
'location' => 'addaccount',
|
||||
// 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'])
|
||||
@ -879,6 +872,13 @@ class accounts
|
||||
{
|
||||
$GLOBALS['egw']->acl->delete_repository('preferences','nopasswordchange',$data['account_id']);
|
||||
}
|
||||
// call hook to notify interested apps about the new account
|
||||
$GLOBALS['hook_values'] = $data;
|
||||
$GLOBALS['egw']->hooks->process($data+array(
|
||||
'location' => 'addaccount',
|
||||
// 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
|
||||
unset($data['changepassword']);
|
||||
// set memberships if given
|
||||
if ($memberships)
|
||||
|
Loading…
Reference in New Issue
Block a user