@@ -7,7 +7,7 @@ |
||
7 | 7 | /* @var yuncms\oauth2\models\OAuth2Client $model */ |
8 | 8 | /* @var ActiveForm $form */ |
9 | 9 | ?> |
10 | -<?php $form = ActiveForm::begin(['layout' => 'horizontal', 'enableAjaxValidation' => true, 'enableClientValidation' => false,]); ?> |
|
10 | +<?php $form = ActiveForm::begin(['layout' => 'horizontal', 'enableAjaxValidation' => true, 'enableClientValidation' => false, ]); ?> |
|
11 | 11 | |
12 | 12 | <?= $form->field($model, 'name')->textInput(['maxlength' => true]) ?> |
13 | 13 | <div class="hr-line-dashed"></div> |
@@ -152,7 +152,7 @@ |
||
152 | 152 | if (($model = OAuth2Client::findOne(['client_id' => $id, 'user_id' => Yii::$app->user->id])) !== null) { |
153 | 153 | return $model; |
154 | 154 | } else { |
155 | - throw new NotFoundHttpException (Yii::t('yuncms', 'The requested page does not exist.')); |
|
155 | + throw new NotFoundHttpException(Yii::t('yuncms', 'The requested page does not exist.')); |
|
156 | 156 | } |
157 | 157 | } |
158 | 158 | } |
159 | 159 | \ No newline at end of file |
@@ -30,7 +30,7 @@ |
||
30 | 30 | 'redirect_uri' => $this->text()->notNull()->comment('Redirect Uri'), |
31 | 31 | 'expires' => $this->integer()->notNull()->comment('Expires'), |
32 | 32 | 'scope' => $this->text()->comment('Scope'), |
33 | - ],$tableOptions); |
|
33 | + ], $tableOptions); |
|
34 | 34 | |
35 | 35 | $this->addPrimaryKey('pk', $this->tableName, 'authorization_code'); |
36 | 36 | $this->createIndex('ix_authorization_code_expires', $this->tableName, 'expires'); |
@@ -29,7 +29,7 @@ |
||
29 | 29 | 'user_id' => $this->integer()->unsigned()->comment('User Id'), |
30 | 30 | 'expires' => $this->integer()->notNull()->comment('Expires'), |
31 | 31 | 'scope' => $this->text()->comment('Scope'), |
32 | - ],$tableOptions); |
|
32 | + ], $tableOptions); |
|
33 | 33 | |
34 | 34 | $this->addPrimaryKey('pk', $this->tableName, 'refresh_token'); |
35 | 35 | $this->createIndex('ix_refresh_token_expires', $this->tableName, 'expires'); |
@@ -42,13 +42,13 @@ |
||
42 | 42 | |
43 | 43 | <div class="modal-header"> |
44 | 44 | <h2 class="modal-title"> |
45 | - <?= Yii::t('yuncms', 'Sign in with your {siteName} account',['siteName'=>Yii::$app->name]) ?> |
|
45 | + <?= Yii::t('yuncms', 'Sign in with your {siteName} account', ['siteName'=>Yii::$app->name]) ?> |
|
46 | 46 | </h2> |
47 | 47 | </div> |
48 | 48 | <div class="modal-body"> |
49 | 49 | <div class="row"> |
50 | 50 | <div class="col-sm-12 col-md-8 col-lg-8 col-md-offset-2 col-lg-offset-2"> |
51 | - <?= $form->field($model, 'login', ['inputOptions' => ['autofocus' => 'autofocus',]]) ?> |
|
51 | + <?= $form->field($model, 'login', ['inputOptions' => ['autofocus' => 'autofocus', ]]) ?> |
|
52 | 52 | <?= $form->field($model, 'password')->passwordInput() ?> |
53 | 53 | <?= Html::submitButton(Yii::t('yuncms', 'Login'), ['class' => 'btn btn-primary btn-block mt-10']) ?> |
54 | 54 | </div> |
@@ -50,13 +50,13 @@ discard block |
||
50 | 50 | const AFTER_REGISTER = 'afterRegister'; |
51 | 51 | |
52 | 52 | //场景定义 |
53 | - const SCENARIO_CREATE = 'create';//后台或控制台创建用户 |
|
54 | - const SCENARIO_UPDATE = 'update';//后台或控制台修改用户 |
|
55 | - const SCENARIO_REGISTER = 'basic_create';//邮箱注册 |
|
56 | - const SCENARIO_EMAIL_REGISTER = 'email_create';//邮箱注册 |
|
57 | - const SCENARIO_MOBILE_REGISTER = 'mobile_create';//手机号注册 |
|
58 | - const SCENARIO_SETTINGS = 'settings';//更新 |
|
59 | - const SCENARIO_CONNECT = 'connect';//账户链接或自动注册新用户 |
|
53 | + const SCENARIO_CREATE = 'create'; //后台或控制台创建用户 |
|
54 | + const SCENARIO_UPDATE = 'update'; //后台或控制台修改用户 |
|
55 | + const SCENARIO_REGISTER = 'basic_create'; //邮箱注册 |
|
56 | + const SCENARIO_EMAIL_REGISTER = 'email_create'; //邮箱注册 |
|
57 | + const SCENARIO_MOBILE_REGISTER = 'mobile_create'; //手机号注册 |
|
58 | + const SCENARIO_SETTINGS = 'settings'; //更新 |
|
59 | + const SCENARIO_CONNECT = 'connect'; //账户链接或自动注册新用户 |
|
60 | 60 | const SCENARIO_PASSWORD = 'password'; |
61 | 61 | |
62 | 62 | //头像 |
@@ -102,8 +102,8 @@ discard block |
||
102 | 102 | static::SCENARIO_EMAIL_REGISTER => ['nickname', 'email', 'password'], |
103 | 103 | static::SCENARIO_MOBILE_REGISTER => ['mobile', 'password'], |
104 | 104 | static::SCENARIO_SETTINGS => ['username', 'email', 'password'], |
105 | - static::SCENARIO_CONNECT => ['nickname', 'email', 'password'],//链接账户密码可以为空邮箱可以为空 |
|
106 | - static::SCENARIO_PASSWORD => ['password'],//只修改密码 |
|
105 | + static::SCENARIO_CONNECT => ['nickname', 'email', 'password'], //链接账户密码可以为空邮箱可以为空 |
|
106 | + static::SCENARIO_PASSWORD => ['password'], //只修改密码 |
|
107 | 107 | ]); |
108 | 108 | } |
109 | 109 |
@@ -49,8 +49,8 @@ |
||
49 | 49 | 'redirect_uri', |
50 | 50 | [ |
51 | 51 | 'label' => Yii::t('yuncms', 'Grant type'), |
52 | - 'value' => function ($model) { |
|
53 | - if(empty($model->grant_type)){ |
|
52 | + 'value' => function($model) { |
|
53 | + if (empty($model->grant_type)) { |
|
54 | 54 | return Yii::t('yuncms', 'All Type'); |
55 | 55 | } |
56 | 56 | return $model->grant_type; |
@@ -29,7 +29,7 @@ |
||
29 | 29 | 'columns' => [ |
30 | 30 | [ |
31 | 31 | 'label' => Yii::t('yuncms', 'App Name'), |
32 | - 'value' => function ($model) { |
|
32 | + 'value' => function($model) { |
|
33 | 33 | return Html::a(Html::encode($model->name), ['/oauth2/client/view', 'id' => $model->client_id]); |
34 | 34 | }, |
35 | 35 | 'format' => 'html' |
@@ -31,7 +31,7 @@ |
||
31 | 31 | */ |
32 | 32 | public function execute($queue) |
33 | 33 | { |
34 | - if(self::getVolume()->has($this->path)){ |
|
34 | + if (self::getVolume()->has($this->path)) { |
|
35 | 35 | self::getVolume()->delete($this->path); |
36 | 36 | } |
37 | 37 | } |