public function checkLogin() { $userInfo = $this->getUserInfo(); if ($userInfo) { $user = new User(); $user->load($userInfo, ''); $user->saveUserInfo(); if (Yii::$app->user->login($user, 3600 * 24)) { return true; } } return false; }