diff options
author | Dries Buytaert <dries@buytaert.net> | 2010-06-29 18:24:10 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2010-06-29 18:24:10 +0000 |
commit | ef1fd4887aedfd7c33477300977fadd053478b1e (patch) | |
tree | 5e9ccc183e2f8918af410ce186cfbbe0e59137a9 /modules/trigger/trigger.module | |
parent | 7640e03624f2242653143267f66fbfcca42656d8 (diff) | |
download | brdo-ef1fd4887aedfd7c33477300977fadd053478b1e.tar.gz brdo-ef1fd4887aedfd7c33477300977fadd053478b1e.tar.bz2 |
- Patch #721086 by rfay, aspilicious, andypost: create tests for system actions, clean up token replacement, clean up triggers.
Diffstat (limited to 'modules/trigger/trigger.module')
-rw-r--r-- | modules/trigger/trigger.module | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/modules/trigger/trigger.module b/modules/trigger/trigger.module index 93ed2485c..91c36c65d 100644 --- a/modules/trigger/trigger.module +++ b/modules/trigger/trigger.module @@ -145,9 +145,6 @@ function trigger_trigger_info() { ), ), 'user' => array( - 'user_presave' => array( - 'label' => t('When either creating a new user account or updating an existing'), - ), 'user_insert' => array( 'label' => t('After creating a new user account'), ), @@ -488,18 +485,11 @@ function trigger_user_login(&$edit, $account, $category) { * Implements hook_user_logout(). */ function trigger_user_logout($account) { - $edit = NULL; + $edit = array(); _trigger_user('user_logout', $edit, $account); } /** - * Implements hook_user_presave(). - */ -function trigger_user_presave(&$edit, $account, $category) { - _trigger_user('user_presave', $edit, $account, $category); -} - -/** * Implements hook_user_insert(). */ function trigger_user_insert(&$edit, $account, $category) { @@ -528,7 +518,8 @@ function trigger_user_cancel($edit, $account, $method) { * Implements hook_user_delete(). */ function trigger_user_delete($account) { - _trigger_user('user_delete', $edit, $account, $method); + $edit = array(); + _trigger_user('user_delete', $edit, $account, NULL); } /** @@ -557,7 +548,7 @@ function _trigger_user($hook, &$edit, $account, $category = NULL) { if (!isset($objects[$type])) { $objects[$type] = _trigger_normalize_user_context($type, $account); } - $context['account'] = $account; + $context['user'] = $account; actions_do($aid, $objects[$type], $context); } else { |