Fixed login/logout message translations.

This commit is contained in:
Andy Miller
2016-05-03 13:36:06 -06:00
parent 7256d65a0e
commit 98a19f01e4
3 changed files with 20 additions and 6 deletions

View File

@@ -269,9 +269,10 @@ class AdminController
*/
protected function taskLogout()
{
$language = $this->grav['user']->authenticated ? $this->grav['user']->language : ($this->grav['language']->getLanguage() ?: 'en');
$this->admin->session()->invalidate()->start();
$this->admin->setMessage($this->admin->translate('PLUGIN_ADMIN.LOGGED_OUT'), 'info');
$this->setRedirect('/logout');
$this->setRedirect('/logout/lang:'.$language);
return true;
}