diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-05-20 12:34:48 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-05-20 12:34:48 +0000 |
commit | 2934a3d9bd001fc746456696a818f36f40ed75c7 (patch) | |
tree | a2f39026a09c70404823a39606d177c89713a622 /modules/system/system.install | |
parent | b86d106e0e8e4417cefc0f0318cb2ba108073194 (diff) | |
download | brdo-2934a3d9bd001fc746456696a818f36f40ed75c7.tar.gz brdo-2934a3d9bd001fc746456696a818f36f40ed75c7.tar.bz2 |
- Patch #144859 by dww: added optional e-mail notifications when user are approved, blocked, or deleted.
Diffstat (limited to 'modules/system/system.install')
-rw-r--r-- | modules/system/system.install | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/modules/system/system.install b/modules/system/system.install index 52809fa92..7bc70779f 100644 --- a/modules/system/system.install +++ b/modules/system/system.install @@ -4033,6 +4033,36 @@ function system_update_6016() { } /** + * Rename settings related to user.module email notifications. + */ +function system_update_6017() { + $ret = array(); + // Maps old names to new ones. + $var_names = array( + 'admin' => 'register_admin_created', + 'approval' => 'register_pending_approval', + 'welcome' => 'register_no_approval_required', + 'pass' => 'password_reset', + ); + foreach ($var_names as $old => $new) { + foreach (array('_subject', '_body') as $suffix) { + $old_name = 'user_mail_'. $old . $suffix; + $new_name = 'user_mail_'. $new . $suffix; + if ($old_val = variable_get($old_name, FALSE)) { + variable_set($new_name, $old_val); + variable_del($old_name); + $ret[] = array('success' => TRUE, 'query' => "variable_set($new_name)"); + $ret[] = array('success' => TRUE, 'query' => "variable_del($old_name)"); + if ($old_name == 'user_mail_approval_body') { + drupal_set_message(t('Saving an old value of the welcome message body for users that are pending administrator approval. However, you should consider modifying this text, since Drupal can now be configured to automatically notify users and send them their login infomation when their accounts are approved. See the !admin_user_settings page for details.', array('!admin_user_settings' => l(t('User settings'), 'admin/user/settings')))); + } + } + } + } + return $ret; +} + +/** * @} End of "defgroup updates-5.x-to-6.x" * The next series of updates should start at 7000. */ |