aboutsummaryrefslogtreecommitdiff
path: root/actions/email/save.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/email/save.php')
-rw-r--r--actions/email/save.php22
1 files changed, 12 insertions, 10 deletions
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