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