From 45fe6d9feaa0138322762c0c97a8d4c800080ebc Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Fri, 29 Jun 2012 13:54:13 +0000 Subject: [PATCH] for new (autocreated) accounts, set ->can change password<- appropriately, move section before processing of hooks --- phpgwapi/inc/class.accounts.inc.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/phpgwapi/inc/class.accounts.inc.php b/phpgwapi/inc/class.accounts.inc.php index e7a51fcc5a..2b18919818 100644 --- a/phpgwapi/inc/class.accounts.inc.php +++ b/phpgwapi/inc/class.accounts.inc.php @@ -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)