mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-26 04:41:41 +02:00
updated hooks for add/delete accounts and update password
This commit is contained in:
parent
3a8ab14e49
commit
b834ae9638
@ -151,6 +151,9 @@
|
|||||||
$GLOBALS['phpgw']->hooks->single('deleteaccount','preferences');
|
$GLOBALS['phpgw']->hooks->single('deleteaccount','preferences');
|
||||||
$GLOBALS['phpgw']->hooks->single('deleteaccount','admin');
|
$GLOBALS['phpgw']->hooks->single('deleteaccount','admin');
|
||||||
|
|
||||||
|
$GLOBALS['hook_values']['account_id'] = $lid;
|
||||||
|
$GLOBALS['phpgw']->hooks->process('deleteaccount');
|
||||||
|
|
||||||
$basedir = $GLOBALS['phpgw_info']['server']['files_dir'] . SEP . 'users' . SEP;
|
$basedir = $GLOBALS['phpgw_info']['server']['files_dir'] . SEP . 'users' . SEP;
|
||||||
|
|
||||||
if (! @rmdir($basedir . $lid))
|
if (! @rmdir($basedir . $lid))
|
||||||
@ -324,6 +327,9 @@
|
|||||||
if (!$errors = $this->validate_user($userData))
|
if (!$errors = $this->validate_user($userData))
|
||||||
{
|
{
|
||||||
$this->so->add_user($userData);
|
$this->so->add_user($userData);
|
||||||
|
$GLOBALS['hook_values']['account_id'] = $account_id;
|
||||||
|
$GLOBALS['hook_values']['new_passwd'] = $userData['account_passwd'];
|
||||||
|
$GLOBALS['phpgw']->hooks->process('addaccount');
|
||||||
ExecMethod('admin.uiaccounts.list_users');
|
ExecMethod('admin.uiaccounts.list_users');
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
@ -734,6 +740,10 @@
|
|||||||
{
|
{
|
||||||
$auth = CreateObject('phpgwapi.auth');
|
$auth = CreateObject('phpgwapi.auth');
|
||||||
$auth->change_password($old_passwd, $_userData['account_passwd'], $_userData['account_id']);
|
$auth->change_password($old_passwd, $_userData['account_passwd'], $_userData['account_id']);
|
||||||
|
$GLOBALS['hook_values']['account_id'] = $_userData['account_id'];
|
||||||
|
$GLOBALS['hook_values']['old_passwd'] = $old_passwd;
|
||||||
|
$GLOBALS['hook_values']['new_passwd'] = $_userData['account_passwd'];
|
||||||
|
$GLOBALS['phpgw']->hooks->process('changepassword');
|
||||||
}
|
}
|
||||||
|
|
||||||
$apps = CreateObject('phpgwapi.applications',array(intval($_userData['account_id']),'u'));
|
$apps = CreateObject('phpgwapi.applications',array(intval($_userData['account_id']),'u'));
|
||||||
|
@ -75,9 +75,12 @@
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$GLOBALS['phpgw_info']['user']['passwd'] = $GLOBALS['phpgw']->auth->change_password($o_passwd, $n_passwd);
|
$GLOBALS['phpgw_info']['user']['passwd'] = $GLOBALS['phpgw']->auth->change_password($o_passwd, $n_passwd);
|
||||||
|
$GLOBALS['hook_values']['account_id'] = $GLOBALS['phpgw_info']['user']['account_id'];
|
||||||
|
$GLOBALS['hook_values']['old_passwd'] = $o_passwd;
|
||||||
|
$GLOBALS['hook_values']['new_passwd'] = $n_passwd;
|
||||||
|
$GLOBALS['phpgw']->hooks->process('changepassword');
|
||||||
Header('Location: ' . $GLOBALS['phpgw']->link('/preferences/index.php','cd=18'));
|
Header('Location: ' . $GLOBALS['phpgw']->link('/preferences/index.php','cd=18'));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user