email_confirmed) { throw new ConfirmationEmailException(trans('errors.email_already_confirmed'), '/login'); } $this->deleteByUser($user); $token = $this->createTokenForUser($user); $user->notify(new ConfirmEmail($token)); } /** * Check if confirmation is required in this instance. * * @return bool */ public function confirmationRequired(): bool { return setting('registration-confirmation') || setting('registration-restrict'); } }