diff --git a/framework/core/src/Api/Controller/SendConfirmationEmailController.php b/framework/core/src/Api/Controller/SendConfirmationEmailController.php index ee66598f4..5912ad275 100644 --- a/framework/core/src/Api/Controller/SendConfirmationEmailController.php +++ b/framework/core/src/Api/Controller/SendConfirmationEmailController.php @@ -71,7 +71,7 @@ class SendConfirmationEmailController implements RequestHandlerInterface $this->assertRegistered($actor); - if ($actor->id != $id || $actor->is_activated) { + if ($actor->id != $id || $actor->is_email_confirmed) { throw new PermissionDeniedException; } diff --git a/framework/core/src/User/Command/ConfirmEmailHandler.php b/framework/core/src/User/Command/ConfirmEmailHandler.php index 0956813e7..16a691409 100644 --- a/framework/core/src/User/Command/ConfirmEmailHandler.php +++ b/framework/core/src/User/Command/ConfirmEmailHandler.php @@ -44,9 +44,7 @@ class ConfirmEmailHandler $user = $token->user; $user->changeEmail($token->email); - if (! $user->is_activated) { - $user->activate(); - } + $user->activate(); $user->save(); $this->dispatchEventsFor($user); diff --git a/framework/core/tests/integration/api/users/CreationTest.php b/framework/core/tests/integration/api/users/CreationTest.php index eb5cad123..e77a44ccc 100644 --- a/framework/core/tests/integration/api/users/CreationTest.php +++ b/framework/core/tests/integration/api/users/CreationTest.php @@ -111,7 +111,7 @@ class CreationTest extends TestCase /** @var User $user */ $user = User::where('username', 'test')->firstOrFail(); - $this->assertEquals(0, $user->is_activated); + $this->assertEquals(0, $user->is_email_confirmed); $this->assertEquals('test', $user->username); $this->assertEquals('test@machine.local', $user->email); }