diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-01-08 08:42:13 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-01-08 08:42:13 +0000 |
commit | 9a32ca468a320bec9769ed3c29c50b5a1f4459b1 (patch) | |
tree | 1986a66b2cdb4ca7df540a19427605ef905e9b8d /modules/user/user.install | |
parent | 1eb5be733ab7df65ffa1713c6c5dbba1558547ff (diff) | |
download | brdo-9a32ca468a320bec9769ed3c29c50b5a1f4459b1.tar.gz brdo-9a32ca468a320bec9769ed3c29c50b5a1f4459b1.tar.bz2 |
#8 by sun and most of #drupal: Users can now cancel their accounts. Fixing the 8th issue, almost 8 years later, on January 8th, after working 8 days full-time on it. GREAT WORK :D
Diffstat (limited to 'modules/user/user.install')
-rw-r--r-- | modules/user/user.install | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/modules/user/user.install b/modules/user/user.install index 0583d3cd1..435bbe628 100644 --- a/modules/user/user.install +++ b/modules/user/user.install @@ -360,6 +360,34 @@ function user_update_7002(&$sandbox) { } /** + * Update user settings for cancelling user accounts. + * + * Prior to 7.x, users were not able to cancel their accounts. When + * administrators deleted an account, all contents were assigned to uid 0, + * which is the same as the 'user_cancel_reassign' method now. + */ +function user_update_7003() { + $ret = array(); + // Set the default account cancellation method. + variable_set('user_cancel_method', 'user_cancel_reassign'); + // Re-assign notification setting. + if ($setting = variable_get('user_mail_status_deleted_notify', FALSE)) { + variable_set('user_mail_status_canceled_notify', $setting); + variable_del('user_mail_status_deleted_notify'); + } + // Re-assign "Account deleted" mail strings to "Account canceled" mail. + if ($setting = variable_get('user_mail_status_deleted_subject', FALSE)) { + variable_set('user_mail_status_canceled_subject', $setting); + variable_del('user_mail_status_deleted_subject'); + } + if ($setting = variable_get('user_mail_status_deleted_body', FALSE)) { + variable_set('user_mail_status_canceled_body', $setting); + variable_del('user_mail_status_deleted_body'); + } + return $ret; +} + +/** * @} End of "defgroup user-updates-6.x-to-7.x" * The next series of updates should start at 8000. */ |