- } catch (Exception $exception) {
- if ($exception instanceof UserTokenNotFoundException) {
- $this->showErrorNotification(trans('errors.email_confirmation_invalid'));
-
- return redirect('/register');
- }
-
- if ($exception instanceof UserTokenExpiredException) {
- $user = $this->userRepo->getById($exception->userId);
- $this->emailConfirmationService->sendConfirmation($user);
- $this->showErrorNotification(trans('errors.email_confirmation_expired'));
+ } catch (UserTokenNotFoundException $exception) {
+ $this->showErrorNotification(trans('errors.email_confirmation_invalid'));