From 1f621d9827040d9730946a5804dd3d7269198ccc Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Wed, 1 Sep 2010 21:24:41 -0700 Subject: 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. --- modules/gallery/helpers/gallery_event.php | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'modules/gallery/helpers/gallery_event.php') 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); + } + } } -- cgit v1.2.3