Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
  • Loading branch information
skeeks-semenov committed Jul 10, 2020
1 parent daddf5a commit 324e579
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/controllers/AuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
use skeeks\cms\components\Cms;
use skeeks\cms\helpers\AjaxRequestResponse;
use skeeks\cms\helpers\RequestResponse;
use skeeks\cms\models\CmsUser;
use skeeks\cms\models\CmsUserEmail;
use skeeks\cms\models\forms\LoginForm;
use skeeks\cms\models\forms\LoginFormUsernameOrEmail;
Expand Down Expand Up @@ -102,6 +103,10 @@ public function onAuthSuccess($client)
$user = $userEmailModel->user;
}
}

if (!$user) {
$user = CmsUser::find()->where(['email' => $emailFromAuthClient])->one();
}
}

if (!$user)
Expand Down

0 comments on commit 324e579

Please sign in to comment.