Skip to content

Commit 491b0d2

Browse files
committed
fixed phpstan error
1 parent 03351e0 commit 491b0d2

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

docs/forcing_password_reset.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ if ($user->requiresPasswordReset()) {
2626

2727
### Force Password Reset On a User
2828

29-
To force password reset on a user, you can do so using the `forcePasswordReset()` method on the `User` entity. Returns boolean `true`/`false`.
29+
To force password reset on a user, you can do so using the `forcePasswordReset()` method on the `User` entity.
3030

3131
```php
3232
$user->forcePasswordReset();
3333
```
3434

3535
### Remove Force Password Reset Flag On a User
3636

37-
Undoing or removing the force password reset flag on a user can be done using the `undoForcePasswordReset()` method on the `User` entity. Returns boolean `true`/`false`.
37+
Undoing or removing the force password reset flag on a user can be done using the `undoForcePasswordReset()` method on the `User` entity.
3838

3939
```php
4040
$user->undoForcePasswordReset();

src/Traits/Resettable.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ public function forcePasswordReset(): void
3939
$identity_model = model(UserIdentityModel::class);
4040
$identity_model->set('force_reset', 1);
4141
$identity_model->where(['user_id' => $this->id, 'type' => Session::ID_TYPE_EMAIL_PASSWORD]);
42-
$result = $identity_model->update();
43-
44-
return $this->checkQueryReturn($result);
42+
$identity_model->update();
4543
}
4644

4745
/**
@@ -58,8 +56,6 @@ public function undoForcePasswordReset(): void
5856
$identity_model = model(UserIdentityModel::class);
5957
$identity_model->set('force_reset', 0);
6058
$identity_model->where(['user_id' => $this->id, 'type' => Session::ID_TYPE_EMAIL_PASSWORD]);
61-
$return = $identity_model->update();
62-
63-
return $this->checkQueryReturn($return);
59+
$identity_model->update();
6460
}
6561
}

0 commit comments

Comments
 (0)