aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actions/email/save.php30
-rw-r--r--actions/user/language.php13
-rw-r--r--actions/user/name.php13
3 files changed, 33 insertions, 23 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'));
diff --git a/actions/user/language.php b/actions/user/language.php
index 704939ca1..7a383b3a0 100644
--- a/actions/user/language.php
+++ b/actions/user/language.php
@@ -26,11 +26,14 @@
if (($user) && ($language))
{
- $user->language = $language;
- if ($user->save())
- system_message(elgg_echo('user:language:success'));
- else
- register_error(elgg_echo('user:language:fail'));
+ if (strcmp($language, $user->language)!=0)
+ {
+ $user->language = $language;
+ if ($user->save())
+ system_message(elgg_echo('user:language:success'));
+ else
+ register_error(elgg_echo('user:language:fail'));
+ }
}
else
register_error(elgg_echo('user:language:fail'));
diff --git a/actions/user/name.php b/actions/user/name.php
index 65809323c..d00b86a17 100644
--- a/actions/user/name.php
+++ b/actions/user/name.php
@@ -26,11 +26,14 @@
if (($user) && ($name))
{
- $user->name = $name;
- if ($user->save())
- system_message(elgg_echo('user:name:success'));
- else
- register_error(elgg_echo('user:name:fail'));
+ if (strcmp($name, $user->name)!=0)
+ {
+ $user->name = $name;
+ if ($user->save())
+ system_message(elgg_echo('user:name:success'));
+ else
+ register_error(elgg_echo('user:name:fail'));
+ }
}
else
register_error(elgg_echo('user:name:fail'));