public function loginAdmin() { if ($this->validate() && (User::isAdmin($this->username) || User::isSuperAdmin($this->username))) { return Yii::$app->user->login($this->getUser(), $this->rememberMe ? 3600 * 24 * 30 : 0); } else { return false; } }