]> BookStack Code Mirror - bookstack/blobdiff - app/Auth/Access/Saml2Service.php
Extend /users API endpoint
[bookstack] / app / Auth / Access / Saml2Service.php
index 0316ff976e4623e222ac69cdcf956f8efab55334..105853997cd4d939c3fefe66678915dea89bdaa9 100644 (file)
@@ -6,6 +6,8 @@ use BookStack\Exceptions\JsonDebugException;
 use BookStack\Exceptions\SamlException;
 use BookStack\Exceptions\UserRegistrationException;
 use BookStack\Facades\Activity;
+use BookStack\Facades\Theme;
+use BookStack\Theming\ThemeEvents;
 use Exception;
 use Illuminate\Support\Str;
 use OneLogin\Saml2\Auth;
@@ -375,6 +377,7 @@ class Saml2Service extends ExternalAuthService
 
         auth()->login($user);
         Activity::add(ActivityType::AUTH_LOGIN, "saml2; {$user->logDescriptor()}");
+        Theme::dispatch(ThemeEvents::AUTH_LOGIN, 'saml2', $user);
         return $user;
     }
 }