aboutsummaryrefslogtreecommitdiff
path: root/actions/user
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-01-16 16:48:44 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-01-16 16:48:44 +0000
commit1d9e80aeaacd698be3afcb5046856db0a6a333a5 (patch)
treeaa66cdabf0eb4a2f209b9944795d0afdbe831a32 /actions/user
parent4bf078505fa18f7a337ea63a689b773a76dd0ebc (diff)
downloadelgg-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/user')
-rw-r--r--actions/user/language.php13
-rw-r--r--actions/user/name.php13
2 files changed, 16 insertions, 10 deletions
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'));