Skip to content
Snippets Groups Projects
Commit 809d7f41 authored by John Franklin's avatar John Franklin Committed by Sascha Grossenbacher
Browse files

Issue #2748731 by joelpittet, bradjones1, yobottehg, dmundra, hilly510,...

Issue #2748731 by joelpittet, bradjones1, yobottehg, dmundra, hilly510, kassiesharp, John Franklin: Don't attempt username sync when user was already matched by username
parent 84829ec5
No related branches found
No related tags found
1 merge request!34Issue #3289683 by Berdir, japerry, Project Update Bot: New 4.x branch for...
Pipeline #46286 canceled
......@@ -249,10 +249,10 @@ class SimplesamlphpDrupalAuth {
$existing = FALSE;
$account_search = $this->entityTypeManager->getStorage('user')->loadByProperties(['name' => $name]);
if ($existing_account = reset($account_search)) {
$existing = TRUE;
if ($account->id() != $existing_account->id()) {
$existing = TRUE;
$logger_params = [
'%username' => $name, '%new_uid' => $this->currentUser->id(),
'%username' => $name, '%new_uid' => $account->id(),
'%existing_uid' => $existing_account->id(),
];
$this->logger->critical("Error on synchronizing name attribute for uid %new_uid: an account with the username %username and uid %existing_uid already exists.", $logger_params);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment