public function actionLogout() { $mem = new Mem(); $mem->delUserInfo(); \Yii::$app->user->logout(); return $this->redirect('/admin/login'); }
public static function updateLoginInfo($id) { $memCache = new Mem(); $memCache->setUserInfo(); self::updateAll(['login_time' => time(), 'login_ip' => $id], 'id=' . Yii::$app->user->identity->getId()); }