mirror of
https://github.com/flarum/framework.git
synced 2024-11-23 07:50:32 +08:00
Rename dead is_activated references with the new is_email_confirmed (#1974)
This commit is contained in:
parent
17257aacaf
commit
d5ebbab3a7
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user