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/profile | |
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/profile')
-rw-r--r-- | modules/profile/profile.module | 81 |
1 files changed, 59 insertions, 22 deletions
diff --git a/modules/profile/profile.module b/modules/profile/profile.module index c5ade96b1..abb70d9c1 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -194,29 +194,66 @@ function profile_block($op = 'list', $delta = '', $edit = array()) { } /** - * Implementation of hook_user(). + * Implementation of hook_user_load(). */ -function profile_user($type, &$edit, &$user, $category = NULL) { - switch ($type) { - case 'load': - return profile_load_profile($user); - case 'register': - return profile_form_profile($edit, $user, $category, TRUE); - case 'update': - return profile_save_profile($edit, $user, $category); - case 'insert': - return profile_save_profile($edit, $user, $category, TRUE); - case 'view': - return profile_view_profile($user); - case 'form': - return profile_form_profile($edit, $user, $category); - case 'validate': - return profile_validate_profile($edit, $category); - case 'categories': - return profile_categories(); - case 'delete': - db_query('DELETE FROM {profile_values} WHERE uid = %d', $user->uid); - } +function profile_user_load(&$edit, &$user, $category = NULL) { + return profile_load_profile($user); +} + +/** + * Implementation of hook_user_register(). + */ +function profile_user_register(&$edit, &$user, $category = NULL) { + return profile_form_profile($edit, $user, $category, TRUE); +} + +/** + * Implementation of hook_user_update(). + */ +function profile_user_update(&$edit, &$user, $category = NULL) { + return profile_save_profile($edit, $user, $category); +} + +/** + * Implementation of hook_user_insert(). + */ +function profile_user_insert(&$edit, &$user, $category = NULL) { + return profile_save_profile($edit, $user, $category, TRUE); +} + +/** + * Implementation of hook_user_view(). + */ +function profile_user_view(&$edit, &$user, $category = NULL) { + return profile_view_profile($user); +} + +/** + * Implementation of hook_user_form(). + */ +function profile_user_form(&$edit, &$user, $category = NULL) { + return profile_form_profile($edit, $user, $category); +} + +/** + * Implementation of hook_user_validate(). + */ +function profile_user_validate(&$edit, &$user, $category = NULL) { + return profile_validate_profile($edit, $category); +} + +/** + * Implementation of hook_user_categories(). + */ +function profile_user_categories(&$edit, &$user, $category = NULL) { + return profile_categories(); +} + +/** + * Implementation of hook_user_delete(). + */ +function profile_user_delete(&$edit, &$user, $category = NULL) { + db_query('DELETE FROM {profile_values} WHERE uid = %d', $user->uid); } function profile_load_profile(&$user) { |