diff options
author | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-01-16 16:48:44 +0000 |
---|---|---|
committer | marcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-01-16 16:48:44 +0000 |
commit | 1d9e80aeaacd698be3afcb5046856db0a6a333a5 (patch) | |
tree | aa66cdabf0eb4a2f209b9944795d0afdbe831a32 /actions/email/save.php | |
parent | 4bf078505fa18f7a337ea63a689b773a76dd0ebc (diff) | |
download | elgg-1d9e80aeaacd698be3afcb5046856db0a6a333a5.tar.gz elgg-1d9e80aeaacd698be3afcb5046856db0a6a333a5.tar.bz2 |
Closes #689: Email now only changed if it is different than the one registered, also a number of other settings changed in this way.
git-svn-id: https://code.elgg.org/elgg/trunk@2576 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'actions/email/save.php')
-rw-r--r-- | actions/email/save.php | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/actions/email/save.php b/actions/email/save.php index 4c2301c92..f5a2993f7 100644 --- a/actions/email/save.php +++ b/actions/email/save.php @@ -24,24 +24,28 @@ else $user = get_entity($user_id); - if ($user) + if ($user) { - if (!get_user_by_email($email)) + if (strcmp($email,$user->email)!=0) { -
- if ($user->email != $email) { - $user->email = $email; - if ($user->save()) - { - request_user_validation($user->getGUID()); - system_message(elgg_echo('email:save:success')); + + if (!get_user_by_email($email)) + { +
+ if ($user->email != $email) { + $user->email = $email; + if ($user->save()) + { + request_user_validation($user->getGUID()); + system_message(elgg_echo('email:save:success')); + } + else + register_error(elgg_echo('email:save:fail'));
} - else - register_error(elgg_echo('email:save:fail'));
} + else + register_error(elgg_echo('registration:dupeemail')); } - else - register_error(elgg_echo('registration:dupeemail')); } else register_error(elgg_echo('email:save:fail')); |