aboutsummaryrefslogtreecommitdiff
path: root/actions/user/language.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/user/language.php')
-rw-r--r--actions/user/language.php13
1 files changed, 8 insertions, 5 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'));