@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | |
129 | 129 | if ($user->load(Yii::$app->request->post()) && $user->createUser()) { |
130 | 130 | $account->connect($user); |
131 | - Yii::$app->user->login($user, Yii::$app->settings->get('rememberFor','user')); |
|
131 | + Yii::$app->user->login($user, Yii::$app->settings->get('rememberFor', 'user')); |
|
132 | 132 | return $this->goBack(); |
133 | 133 | } |
134 | 134 | |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | public function actionConfirm($id, $code) |
150 | 150 | { |
151 | 151 | $user = User::findOne($id); |
152 | - if ($user === null || Yii::$app->settings->get('enableConfirmation','user') == false) { |
|
152 | + if ($user === null || Yii::$app->settings->get('enableConfirmation', 'user') == false) { |
|
153 | 153 | return $this->goBack(); |
154 | 154 | } |
155 | 155 | $user->attemptEmailConfirmation($code); |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | */ |
164 | 164 | public function actionResend() |
165 | 165 | { |
166 | - if (Yii::$app->settings->get('enableConfirmation','user') == false) { |
|
166 | + if (Yii::$app->settings->get('enableConfirmation', 'user') == false) { |
|
167 | 167 | return $this->goBack(); |
168 | 168 | } |
169 | 169 | /** @var ResendForm $model */ |
@@ -26,17 +26,17 @@ |
||
26 | 26 | return [ |
27 | 27 | 'id', |
28 | 28 | 'nickname', |
29 | - 'faceUrl' => function () { |
|
29 | + 'faceUrl' => function() { |
|
30 | 30 | return $this->getAvatar(AvatarHelper::AVATAR_MIDDLE); |
31 | 31 | }, |
32 | 32 | 'identified', |
33 | - "created_datetime" => function () { |
|
33 | + "created_datetime" => function() { |
|
34 | 34 | return gmdate(DATE_ISO8601, $this->created_at); |
35 | 35 | }, |
36 | - "updated_datetime" => function () { |
|
36 | + "updated_datetime" => function() { |
|
37 | 37 | return gmdate(DATE_ISO8601, $this->updated_at); |
38 | 38 | }, |
39 | - 'blocked_datetime' => function () { |
|
39 | + 'blocked_datetime' => function() { |
|
40 | 40 | return gmdate(DATE_ISO8601, $this->blocked_at); |
41 | 41 | } |
42 | 42 | ]; |
@@ -69,7 +69,7 @@ |
||
69 | 69 | $filter = null; |
70 | 70 | $dataFilter = Yii::createObject([ |
71 | 71 | 'class' => ActiveDataFilter::class, |
72 | - 'searchModel' => function () { |
|
72 | + 'searchModel' => function() { |
|
73 | 73 | return (new DynamicModel(['verb' => null])) |
74 | 74 | ->addRule('verb', 'string'); |
75 | 75 | }, |
@@ -24,15 +24,15 @@ |
||
24 | 24 | } |
25 | 25 | // https://segmentfault.com/q/1010000000672529/a-1020000000679702 |
26 | 26 | $this->createTable($this->tableName, [ |
27 | - 'id' => $this->char(24)->notNull()->comment('Id'),//通知ID |
|
28 | - 'verb' => $this->string(32),//执行了什么操作 |
|
29 | - 'template' => $this->string(),//模板 |
|
30 | - 'notifiable_id' => $this->unsignedInteger()->notNull()->comment('Entity'),//通知实体ID |
|
31 | - 'notifiable_class' => $this->string()->notNull()->comment('Entity'),//通知实体类名 |
|
32 | - 'data' => $this->text(),//通知数据 |
|
33 | - 'read_at' => $this->unixTimestamp()->comment('Read At'),//阅读时间 |
|
34 | - 'created_at' => $this->unixTimestamp()->notNull()->comment('Created At'),//创建时间 |
|
35 | - 'updated_at' => $this->integer(10)->unsigned()->notNull()->comment('Updated At'),//更新时间 |
|
27 | + 'id' => $this->char(24)->notNull()->comment('Id'), //通知ID |
|
28 | + 'verb' => $this->string(32), //执行了什么操作 |
|
29 | + 'template' => $this->string(), //模板 |
|
30 | + 'notifiable_id' => $this->unsignedInteger()->notNull()->comment('Entity'), //通知实体ID |
|
31 | + 'notifiable_class' => $this->string()->notNull()->comment('Entity'), //通知实体类名 |
|
32 | + 'data' => $this->text(), //通知数据 |
|
33 | + 'read_at' => $this->unixTimestamp()->comment('Read At'), //阅读时间 |
|
34 | + 'created_at' => $this->unixTimestamp()->notNull()->comment('Created At'), //创建时间 |
|
35 | + 'updated_at' => $this->integer(10)->unsigned()->notNull()->comment('Updated At'), //更新时间 |
|
36 | 36 | ], $tableOptions); |
37 | 37 | $this->addPrimaryKey('{{%notification_notifiable_pk}}', $this->tableName, 'id'); |
38 | 38 | $this->createIndex('notification_notifiable', $this->tableName, ['notifiable_id', 'notifiable_class']); |