Skip to content

Instantly share code, notes, and snippets.

@des1roer
Last active October 9, 2015 07:13
Show Gist options
  • Save des1roer/d2046489d3ee756961d0 to your computer and use it in GitHub Desktop.
Save des1roer/d2046489d3ee756961d0 to your computer and use it in GitHub Desktop.
if ($authUser)
{
if ($this->getUser()) /*проверяем есть ли*/
/*вносите узнанного пользователя в базу*/
$connection->createCommand()->insert('user', [
'login' => $this->username,
'role' => 1,
])->execute();
return Yii::$app->user->login($this->getUser(), $this->rememberMe ? 3600 * 24 * 30 : 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment