Skip to content

Commit

Permalink
Add ability to set email confirmation state to false
Browse files Browse the repository at this point in the history
[ci skip] [skip ci]
  • Loading branch information
davwheat committed Jul 31, 2021
1 parent 9490b3d commit e2c4d57
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/User/Command/EditUserHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,14 @@ public function handle(EditUser $command)
}
}

if (! empty($attributes['isEmailConfirmed'])) {
if (isset($attributes['isEmailConfirmed'])) {
$actor->assertAdmin();
$user->activate();

if ($attributes['isEmailConfirmed'] === false) {
$user->is_email_confirmed = false;
} else {
$user->activate();
}
}

if (isset($attributes['password'])) {
Expand Down

0 comments on commit e2c4d57

Please sign in to comment.