diff options
author | Dries Buytaert <dries@buytaert.net> | 2008-10-06 11:30:12 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2008-10-06 11:30:12 +0000 |
commit | 026af5df34694c8ca5c3708f3fe23fd10ec160cb (patch) | |
tree | 3c557e61dd8b65bc31cd3538d499f08785c7d134 /modules/trigger | |
parent | eabf7ab4ca423df42e53d11de30a814b39b03800 (diff) | |
download | brdo-026af5df34694c8ca5c3708f3fe23fd10ec160cb.tar.gz brdo-026af5df34694c8ca5c3708f3fe23fd10ec160cb.tar.bz2 |
- Patch #310212 by justinrandell, catch, et all: killed in _user hook, as well as two small kittens.
Diffstat (limited to 'modules/trigger')
-rw-r--r-- | modules/trigger/trigger.module | 48 |
1 files changed, 46 insertions, 2 deletions
diff --git a/modules/trigger/trigger.module b/modules/trigger/trigger.module index 91416f5dc..e59d33851 100644 --- a/modules/trigger/trigger.module +++ b/modules/trigger/trigger.module @@ -347,9 +347,53 @@ function _trigger_normalize_user_context($type, $account) { } /** - * Implementation of hook_user(). + * trigger_user_login */ -function trigger_user($op, &$edit, &$account, $category = NULL) { +function trigger_user_login(&$edit, &$account, $category) { + _trigger_user('login', $edit, $account, $category); +} + +/** + * Implementation of hook_user_logout(). + */ +function trigger_user_logout(&$edit, &$account, $category) { + _trigger_user('logout', $edit, $account, $category); +} + +/** + * Implementation of hook_user_insert(). + */ +function trigger_user_insert(&$edit, &$account, $category) { + _trigger_user('insert', $edit, $account, $category); +} + +/** + * Implementation of hook_user_update(). + */ +function trigger_user_update(&$edit, &$account, $category) { + _trigger_user('update', $edit, $account, $category); +} + +/** + * Implementation of hook_user_delete(). + */ +function trigger_user_delete(&$edit, &$account, $category) { + _trigger_user('delete', $edit, $account, $category); +} + +/** + * Implementation of hook_user_view(). + */ +function trigger_user_view(&$edit, &$account, $category) { + _trigger_user('view', $edit, $account, $category); +} + +/** + * Simple wrapper function to make user hooks work with new entry points. + * + * @TODO: Take advantage of the new API and reorganise/remove this function. + */ +function _trigger_user($op, &$edit, &$account, $category = NULL) { // Keep objects for reuse so that changes actions make to objects can persist. static $objects; // We support a subset of operations. |