@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | public function bootstrap($qpp) |
20 | 20 | { |
21 | 21 | //Merge main extension config with local extension config |
22 | - $config = include(dirname(__FILE__) . '/config/main.php'); |
|
22 | + $config = include(dirname(__FILE__).'/config/main.php'); |
|
23 | 23 | foreach ($config as $key => $value) { |
24 | 24 | if (is_array($value)) { |
25 | 25 | $this->{$key} = ArrayHelper::merge($value, $this->{$key}); |
@@ -28,9 +28,9 @@ discard block |
||
28 | 28 | } |
29 | 29 | } |
30 | 30 | |
31 | - Yii::setAlias('@yiicod', realpath(dirname(__FILE__) . '/..')); |
|
31 | + Yii::setAlias('@yiicod', realpath(dirname(__FILE__).'/..')); |
|
32 | 32 | // Namespace for migration |
33 | - Yii::setAlias('@yiicod_auth_migrations', realpath(dirname(__FILE__) . '/migrations')); |
|
33 | + Yii::setAlias('@yiicod_auth_migrations', realpath(dirname(__FILE__).'/migrations')); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | } |
@@ -93,9 +93,9 @@ |
||
93 | 93 | |
94 | 94 | Yii::$app->mailer->viewPath = '@yiicod/yii2-auth/mail'; |
95 | 95 | Yii::$app->mailer->compose('passwordResetToken', ['action' => $event->action, 'user' => $event->model->findUser()]) |
96 | - ->setFrom([Yii::$app->params['supportEmail'] => Yii::$app->name . ' robot']) |
|
96 | + ->setFrom([Yii::$app->params['supportEmail'] => Yii::$app->name.' robot']) |
|
97 | 97 | ->setTo($event->model->email) |
98 | - ->setSubject('Password reset for ' . Yii::$app->name) |
|
98 | + ->setSubject('Password reset for '.Yii::$app->name) |
|
99 | 99 | ->send(); |
100 | 100 | |
101 | 101 | Yii::$app->getSession()->setFlash('success', 'Check your email for further instructions.'); |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | if (empty($token)) { |
108 | 108 | return false; |
109 | 109 | } |
110 | - $timestamp = (int)substr($token, strrpos($token, '_') + 1); |
|
110 | + $timestamp = (int) substr($token, strrpos($token, '_') + 1); |
|
111 | 111 | $expire = Yii::$app->params['user.passwordResetTokenExpire']; |
112 | 112 | |
113 | 113 | return $timestamp + $expire >= time(); |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | */ |
192 | 192 | public function generatePasswordResetToken() |
193 | 193 | { |
194 | - $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time(); |
|
194 | + $this->password_reset_token = Yii::$app->security->generateRandomString().'_'.time(); |
|
195 | 195 | } |
196 | 196 | |
197 | 197 | /** |
@@ -16,14 +16,14 @@ |
||
16 | 16 | |
17 | 17 | $this->createTable('{{%user}}', [ |
18 | 18 | 'id' => Schema::TYPE_PK, |
19 | - 'username' => Schema::TYPE_STRING . ' NOT NULL', |
|
20 | - 'email' => Schema::TYPE_STRING . ' NOT NULL', |
|
21 | - 'auth_key' => Schema::TYPE_STRING . '(32) NOT NULL', |
|
22 | - 'password_hash' => Schema::TYPE_STRING . ' NOT NULL', |
|
19 | + 'username' => Schema::TYPE_STRING.' NOT NULL', |
|
20 | + 'email' => Schema::TYPE_STRING.' NOT NULL', |
|
21 | + 'auth_key' => Schema::TYPE_STRING.'(32) NOT NULL', |
|
22 | + 'password_hash' => Schema::TYPE_STRING.' NOT NULL', |
|
23 | 23 | 'password_reset_token' => Schema::TYPE_STRING, |
24 | - 'status' => Schema::TYPE_SMALLINT . ' NOT NULL', |
|
25 | - 'created_date' => Schema::TYPE_DATETIME . ' NOT NULL', |
|
26 | - 'updated_date' => Schema::TYPE_DATETIME . ' NOT NULL', |
|
24 | + 'status' => Schema::TYPE_SMALLINT.' NOT NULL', |
|
25 | + 'created_date' => Schema::TYPE_DATETIME.' NOT NULL', |
|
26 | + 'updated_date' => Schema::TYPE_DATETIME.' NOT NULL', |
|
27 | 27 | ], $tableOptions); |
28 | 28 | } |
29 | 29 |