]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/Auth/ConfirmEmailController.php
Added front-end toggle and testing of inline attachments
[bookstack] / app / Http / Controllers / Auth / ConfirmEmailController.php
index bffeb5f61b2f2f7528b87e6ad506f4b6dded53d2..6e6a0e779d0871e49e9863ffd76a5f8373288395 100644 (file)
@@ -2,12 +2,15 @@
 
 namespace BookStack\Http\Controllers\Auth;
 
+use BookStack\Actions\ActivityType;
 use BookStack\Auth\Access\EmailConfirmationService;
 use BookStack\Auth\UserRepo;
 use BookStack\Exceptions\ConfirmationEmailException;
 use BookStack\Exceptions\UserTokenExpiredException;
 use BookStack\Exceptions\UserTokenNotFoundException;
+use BookStack\Facades\Theme;
 use BookStack\Http\Controllers\Controller;
+use BookStack\Theming\ThemeEvents;
 use Exception;
 use Illuminate\Http\RedirectResponse;
 use Illuminate\Http\Request;
@@ -80,6 +83,8 @@ class ConfirmEmailController extends Controller
         $user->save();
 
         auth()->login($user);
+        Theme::dispatch(ThemeEvents::AUTH_LOGIN, auth()->getDefaultDriver(), $user);
+        $this->logActivity(ActivityType::AUTH_LOGIN, $user);
         $this->showSuccessNotification(trans('auth.email_confirm_success'));
         $this->emailConfirmationService->deleteByUser($user);