SHARE
TWEET

Untitled

a guest Jun 25th, 2019 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public function login()
  2. {
  3.     if ($this->validate()) {
  4.         return Yii::$app->user->login($this->getUser(), 0);
  5.     }
  6.     return false;
  7. }
  8.      
  9. 'user' => [
  10.         'identityClass' => 'appmodelsUser',
  11.         'enableAutoLogin' => true,
  12.     ],
  13.      
  14. 'user' => [
  15.       'identityClass' => 'appmodelsUser',
  16.       'authTimeout' => 60 * 60 * 24 * 100, //100 дней для примера
  17. ],
  18.      
  19. 'user' => [
  20.     'identityClass' => 'appmodelsUser',
  21.     'enableAutoLogin' => true,
  22.     'identityCookie' => ['name' => '_identity', 'httpOnly' => true]
  23. ],
  24.      
  25. public static function findIdentity($id)
  26. {
  27.     return static::findOne($id);
  28. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top