update multi language login site
CR: sonhh (fake)
This commit is contained in:
@@ -14,13 +14,6 @@ use yii\helpers\Url;
|
||||
*/
|
||||
class DashboardController extends Controller {
|
||||
|
||||
public function init() {
|
||||
parent::init();
|
||||
if (Yii::$app->user->isGuest) {
|
||||
return $this->redirect(['/site/login']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
@@ -157,4 +150,12 @@ class DashboardController extends Controller {
|
||||
}
|
||||
}
|
||||
|
||||
public function actionChangeLanguageLogin($lang) {
|
||||
$language = \app\models\common::allLanguage();
|
||||
foreach ($language as $key => $value) {
|
||||
if ($value['name'] === $lang)
|
||||
return $this->redirect(['/site/login', 'lang' => $lang]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user