@@ -42,7 +42,7 @@ |
||
| 42 | 42 | 'rules' => [ |
| 43 | 43 | [ |
| 44 | 44 | 'allow' => true, |
| 45 | - 'actions' => [ 'login', 'logout', 'requestPasswordReset', 'signup', 'resetPassword'] |
|
| 45 | + 'actions' => ['login', 'logout', 'requestPasswordReset', 'signup', 'resetPassword'] |
|
| 46 | 46 | ] |
| 47 | 47 | ] |
| 48 | 48 | ], |
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | /* @var $this yii\web\View */ |
| 5 | 5 | /* @var $user common\models\User */ |
| 6 | 6 | |
| 7 | -$resetLink = yii\helpers\Url::toRoute(['resetPassword', 'token' => $user->passwordResetToken], true);// Yii::$app->urlManager->createAbsoluteUrl( ['site/reset-password', 'token' => $user->password_reset_token]); |
|
| 7 | +$resetLink = yii\helpers\Url::toRoute(['resetPassword', 'token' => $user->passwordResetToken], true); // Yii::$app->urlManager->createAbsoluteUrl( ['site/reset-password', 'token' => $user->password_reset_token]); |
|
| 8 | 8 | ?> |
| 9 | 9 | |
| 10 | 10 | Hello, |
@@ -81,8 +81,7 @@ |
||
| 81 | 81 | public static function findByPasswordResetToken($token) |
| 82 | 82 | { |
| 83 | 83 | $expire = isset(Yii::$app->params['user.passwordResetTokenExpire']) ? |
| 84 | - Yii::$app->params['user.passwordResetTokenExpire'] : |
|
| 85 | - 3600; |
|
| 84 | + Yii::$app->params['user.passwordResetTokenExpire'] : 3600; |
|
| 86 | 85 | $parts = explode('_', $token); |
| 87 | 86 | $timestamp = (int) end($parts); |
| 88 | 87 | if ($timestamp + $expire < time()) { |