]> BookStack Code Mirror - bookstack/blobdiff - app/Access/Oidc/OidcService.php
ZIP Imports: Added API examples, finished testing
[bookstack] / app / Access / Oidc / OidcService.php
index 452fda3d85fca1a9e677f5ab26294863ec80517e..d6f6ef156e40020ba162b2f2bd00587d7afb74c5 100644 (file)
@@ -222,7 +222,7 @@ class OidcService
             throw new OidcException($exception->getMessage());
         }
 
-        if ($this->config()['fetch_avatar'] && $user->wasRecentlyCreated && $userDetails->picture) {
+        if ($this->config()['fetch_avatar'] && !$user->avatar()->exists() && $userDetails->picture) {
             $this->userAvatars->assignToUserFromUrl($user, $userDetails->picture);
         }