diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2010-09-01 21:24:41 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2010-09-01 21:24:41 -0700 |
commit | 1f621d9827040d9730946a5804dd3d7269198ccc (patch) | |
tree | 5db2cdb81d54d069da1fa5da70548330003ab141 /modules/gallery/helpers/gallery_event.php | |
parent | 78c590ebaee738435260e3b0bf6cb8fb5431a08d (diff) |
Refine the patch for #1216. If the admin user changes their email address update the sendmail from and reply_to fields in advanced settings. Also change this if the identity provider has changed.
Diffstat (limited to 'modules/gallery/helpers/gallery_event.php')
-rw-r--r-- | modules/gallery/helpers/gallery_event.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/gallery/helpers/gallery_event.php b/modules/gallery/helpers/gallery_event.php index df5394c9..66b250e9 100644 --- a/modules/gallery/helpers/gallery_event.php +++ b/modules/gallery/helpers/gallery_event.php @@ -63,6 +63,8 @@ class gallery_event_Core { ->update("logs") ->set("user_id", $admin->id) ->execute(); + module::set_var("gallery", "email_from", $admin->email); + module::set_var("gallery", "email_reply_to", $admin->email); } static function group_created($group) { @@ -547,4 +549,11 @@ class gallery_event_Core { $data->content[] = (object) array("title" => t("User information"), "view" => $v); } + + static function user_change_email_form_completed($user, $form) { + if ($user->admin) { + module::set_var("gallery", "email_from", $user->email); + module::set_var("gallery", "email_reply_to", $user->email); + } + } } |