From: Nicolas LÅ“uillet Date: Mon, 18 Aug 2014 12:41:09 +0000 (+0200) Subject: Merge pull request #783 from wallabag/message-after-login X-Git-Tag: 1.8.0^2~20^2 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=051f7fb28c312519419f41025c9a83b6befb91bc;hp=79666a3046035a6871cb56927ef6356eb30d7528;p=github%2Fwallabag%2Fwallabag.git Merge pull request #783 from wallabag/message-after-login #763 fix to display the login successful message with the translation --- diff --git a/inc/poche/Poche.class.php b/inc/poche/Poche.class.php index 098dd7c1..3e9c2991 100755 --- a/inc/poche/Poche.class.php +++ b/inc/poche/Poche.class.php @@ -524,6 +524,14 @@ class Poche $longlastingsession = isset($_POST['longlastingsession']); $passwordTest = ($isauthenticated) ? $user['password'] : Tools::encodeString($password . $login); Session::login($user['username'], $user['password'], $login, $passwordTest, $longlastingsession, array('poche_user' => new User($user))); + + # reload l10n + $language = $user['config']['language']; + @putenv('LC_ALL=' . $language); + setlocale(LC_ALL, $language); + bindtextdomain($language, LOCALE); + textdomain($language); + $this->messages->add('s', _('welcome to your wallabag')); Tools::logm('login successful'); Tools::redirect($referer);