summaryrefslogtreecommitdiff
path: root/modules/profile
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-03-12 15:56:30 +0000
committerDries Buytaert <dries@buytaert.net>2010-03-12 15:56:30 +0000
commit2c3c1a93030bf62ccc2d4a3386b756f01b672d94 (patch)
treea491665a772f1f99b23f1766f1b3ae749be91641 /modules/profile
parent160b42812c2ec0a32fcdcd02f32d3f86e549fac7 (diff)
downloadbrdo-2c3c1a93030bf62ccc2d4a3386b756f01b672d94.tar.gz
brdo-2c3c1a93030bf62ccc2d4a3386b756f01b672d94.tar.bz2
- Patch #705306 by moshe weitzman: user_cancel_delete() method calls into a 'standard' user_delete_multiple() API.
Diffstat (limited to 'modules/profile')
-rw-r--r--modules/profile/profile.module12
1 files changed, 9 insertions, 3 deletions
diff --git a/modules/profile/profile.module b/modules/profile/profile.module
index 39101fd6d..d55c0572c 100644
--- a/modules/profile/profile.module
+++ b/modules/profile/profile.module
@@ -233,15 +233,22 @@ function profile_user_insert(&$edit, $account, $category) {
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;
}
}
/**
+ * Implements hook_user_delete().
+ */
+function profile_user_delete($account) {
+ db_delete('profile_value')
+ ->condition('uid', $account->uid)
+ ->execute();
+}
+
+/**
* Implements hook_user_load().
*/
function profile_user_load($users) {
@@ -621,4 +628,3 @@ function _profile_get_fields($category, $register = FALSE) {
->orderBy('weight', 'ASC')
->execute();
}
-