Skip to content

Commit

Permalink
Авторизация через смс
Browse files Browse the repository at this point in the history
  • Loading branch information
skeeks-semenov committed Jan 24, 2024
1 parent 1b8af2a commit a71dd29
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/widgets/auth/AuthWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

namespace skeeks\cms\themes\unify\widgets\auth;

use skeeks\cms\helpers\RequestResponse;
use skeeks\cms\themes\unify\widgets\auth\assets\AuthAsset;
use yii\base\Widget;
use yii\helpers\Html;
Expand Down Expand Up @@ -43,21 +42,21 @@ public function init()
$this->options['id'] = $this->id;

if ($this->is_allow_auth_by_email === null) {
$this->is_allow_auth_by_email = (int) \Yii::$app->cms->is_allow_auth_by_email;
$this->is_allow_auth_by_email = (int)\Yii::$app->cms->is_allow_auth_by_email;
}
if ($this->auth_submit_code_always === null) {
$this->auth_submit_code_always = (int) \Yii::$app->cms->auth_submit_code_always;
$this->auth_submit_code_always = (int)\Yii::$app->cms->auth_submit_code_always;
}

$this->clientOptions['id'] = $this->id;
$this->clientOptions['url-generate-callcheck-phone-code'] = Url::to(['/cms/auth/generate-callcheck-phone-code']);
$this->clientOptions['url-generate-phone-code'] = Url::to(['/cms/auth/generate-phone-code']);
$this->clientOptions['url-generate-email-code'] = Url::to(['/cms/auth/generate-email-code']);

if (\Yii::$app->cms->callcheckProvider) {
$this->action = "auth-by-callcheck-phone";
} elseif (\Yii::$app->cms->smsProvider) {
if (\Yii::$app->cms->smsProvider) {
$this->action = "auth-by-phone";
} elseif (\Yii::$app->cms->callcheckProvider) {
$this->action = "auth-by-callcheck-phone";
} else {
$this->action = "auth-by-email";
}
Expand Down

0 comments on commit a71dd29

Please sign in to comment.