From 893c085f7837d20f17c80fe4f90865eee56e6ebb Mon Sep 17 00:00:00 2001 From: Lars Kneschke Date: Sun, 25 Jan 2004 22:27:31 +0000 Subject: [PATCH] added addaccount-hook for auto created accounts --- phpgwapi/inc/class.accounts_ldap.inc.php | 9 +++++++++ phpgwapi/inc/class.accounts_sql.inc.php | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/phpgwapi/inc/class.accounts_ldap.inc.php b/phpgwapi/inc/class.accounts_ldap.inc.php index 1efd453512..74026af9a3 100644 --- a/phpgwapi/inc/class.accounts_ldap.inc.php +++ b/phpgwapi/inc/class.accounts_ldap.inc.php @@ -1047,6 +1047,15 @@ } } $this->db->transaction_commit(); + + $GLOBALS['hook_values']['account_lid'] = $acct_info['account_lid']; + $GLOBALS['hook_values']['account_id'] = $accountid; + $GLOBALS['hook_values']['new_passwd'] = $acct_info['account_passwd']; + $GLOBALS['hook_values']['account_status'] = $acct_info['account_status']; + $GLOBALS['phpgw']->hooks->process($GLOBALS['hook_values']+array( + 'location' => 'addaccount' + ),False,True); // called for every app now, not only enabled ones + return $accountid; } diff --git a/phpgwapi/inc/class.accounts_sql.inc.php b/phpgwapi/inc/class.accounts_sql.inc.php index 0aa4bbac8c..050fdbcde7 100644 --- a/phpgwapi/inc/class.accounts_sql.inc.php +++ b/phpgwapi/inc/class.accounts_sql.inc.php @@ -445,6 +445,15 @@ } } $this->db->transaction_commit(); + + $GLOBALS['hook_values']['account_lid'] = $acct_info['account_lid']; + $GLOBALS['hook_values']['account_id'] = $accountid; + $GLOBALS['hook_values']['new_passwd'] = $acct_info['account_passwd']; + $GLOBALS['hook_values']['account_status'] = $acct_info['account_status']; + $GLOBALS['phpgw']->hooks->process($GLOBALS['hook_values']+array( + 'location' => 'addaccount' + ),False,True); // called for every app now, not only enabled ones + return $accountid; }