diff --git a/application/Espo/Core/Authentication/Oidc/Sync.php b/application/Espo/Core/Authentication/Oidc/Sync.php index 1131f0a3f6..b6fdc93755 100644 --- a/application/Espo/Core/Authentication/Oidc/Sync.php +++ b/application/Espo/Core/Authentication/Oidc/Sync.php @@ -287,6 +287,8 @@ class Sync throw new RuntimeException("No `userNameRegularExpression` in config."); } + $username = strtolower($username); + /** @var string $result */ $result = preg_replace("/{$regExp}/", '_', $username);