Commit 3d189457 authored by Andreas Fink's avatar Andreas Fink

Try to work around issue #3 / https://phabricator.wikimedia.org/T95839

parent b1ed22fc
......@@ -124,6 +124,13 @@ class AuthRemoteuser extends MediaWiki\Session\ImmutableSessionProviderWithCooki
if (Hooks::run("AuthRemoteUserInitUser",
array($user, true))
) {
// Check if above hook or some other effect (e.g.: https://phabricator.wikimedia.org/T95839 )
// already created a user in the db. If so, reuse that one.
$userFromDb = $user->getInstanceForUpdate();
if (null !== $userFromDb) {
$user = $user->getInstanceForUpdate();
}
$this->setRealName($user);
$this->setEmail($user, $username);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment