From 31c5b57b92b2b2442527cc601eab113e047b0e93 Mon Sep 17 00:00:00 2001 From: ben Date: Thu, 26 Jun 2008 15:48:28 +0000 Subject: Unified user settings form git-svn-id: https://code.elgg.org/elgg/trunk@1149 36083f99-b078-4883-b0ff-0f9b5a30f544 --- actions/email/save.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'actions/email') diff --git a/actions/email/save.php b/actions/email/save.php index 08fcc7647..79cc40c6d 100644 --- a/actions/email/save.php +++ b/actions/email/save.php @@ -25,19 +25,21 @@ $user = get_entity($user_id); if ($user) - { - $user->email = $email; - if ($user->save()) - { - request_email_validation($user->getGUID()); - system_message(elgg_echo('email:save:success')); + { + if ($user->email != $email) { + $user->email = $email; + if ($user->save()) + { + request_email_validation($user->getGUID()); + system_message(elgg_echo('email:save:success')); + } + else + system_message(elgg_echo('email:save:fail')); } - else - system_message(elgg_echo('email:save:fail')); } else system_message(elgg_echo('email:save:fail')); - forward($_SERVER['HTTP_REFERER']); - exit; + //forward($_SERVER['HTTP_REFERER']); + //exit; ?> \ No newline at end of file -- cgit v1.2.3