1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-08-07 23:03:00 +03:00

OIDC: Added testing coverage for picture fetching

This commit is contained in:
Dan Brown
2025-05-24 14:36:36 +01:00
parent f9dbbe5d70
commit b64c9b31d5
6 changed files with 64 additions and 1 deletions

View File

@@ -222,6 +222,8 @@ class OidcService
throw new OidcException($exception->getMessage());
}
// TODO - Update this (and tests and config option comments) to actually align with LDAP system
// which syncs whenever on login or registration, where there's no existing avatar.
if ($this->config()['fetch_avatar'] && $user->wasRecentlyCreated && $userDetails->picture) {
$this->userAvatars->assignToUserFromUrl($user, $userDetails->picture);
}