aboutsummaryrefslogtreecommitdiff
path: root/actions/login.php
diff options
context:
space:
mode:
authorSem <sembrestels@riseup.net>2012-01-12 16:15:16 +0100
committerSem <sembrestels@riseup.net>2012-01-12 16:15:16 +0100
commitcc544cfa2086e418318a899ffd550adfb744c7ba (patch)
tree6c04fbe2e3df67513aa76803cb8d05c105ba219b /actions/login.php
parente7d64510ebd823f186282e2b80780295bcca1b79 (diff)
parent68e4829ac0959d86c651e7ed6dc255c39694c8af (diff)
downloadelgg-cc544cfa2086e418318a899ffd550adfb744c7ba.tar.gz
elgg-cc544cfa2086e418318a899ffd550adfb744c7ba.tar.bz2
Merge Elgg 1.8.3.
Diffstat (limited to 'actions/login.php')
-rw-r--r--actions/login.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/actions/login.php b/actions/login.php
index c717faadd..256e78acb 100644
--- a/actions/login.php
+++ b/actions/login.php
@@ -46,10 +46,21 @@ if (!$user) {
try {
login($user, $persistent);
+ // re-register at least the core language file for users with language other than site default
+ register_translations(dirname(dirname(__FILE__)) . "/languages/");
} catch (LoginException $e) {
register_error($e->getMessage());
forward(REFERER);
}
-system_message(elgg_echo('loginok'));
+// elgg_echo() caches the language and does not provide a way to change the language.
+// @todo we need to use the config object to store this so that the current language
+// can be changed. Refs #4171
+if ($user->language) {
+ $message = elgg_echo('loginok', array(), $user->language);
+} else {
+ $message = elgg_echo('loginok');
+}
+
+system_message($message);
forward($forward_url);