summaryrefslogtreecommitdiff
path: root/modules/profile
diff options
context:
space:
mode:
Diffstat (limited to 'modules/profile')
-rw-r--r--modules/profile/profile.module11
1 files changed, 8 insertions, 3 deletions
diff --git a/modules/profile/profile.module b/modules/profile/profile.module
index a028800f7..c5360461e 100644
--- a/modules/profile/profile.module
+++ b/modules/profile/profile.module
@@ -259,10 +259,15 @@ function profile_user_categories(&$edit, &$user, $category = NULL) {
}
/**
- * Implementation of hook_user_delete().
+ * Implementation of hook_user_cancel().
*/
-function profile_user_delete(&$edit, &$user, $category = NULL) {
- db_query('DELETE FROM {profile_value} WHERE uid = %d', $user->uid);
+function profile_user_cancel(&$edit, &$account, $method) {
+ switch ($method) {
+ case 'user_cancel_reassign':
+ case 'user_cancel_delete':
+ db_delete('profile_value')->condition('uid', $account->uid)->execute();
+ break;
+ }
}
function profile_load_profile(&$user) {