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

Try to work around issue #3 /

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.: )
// already created a user in the db. If so, reuse that one.
$userFromDb = $user->getInstanceForUpdate();
if (null !== $userFromDb) {
$user = $user->getInstanceForUpdate();
$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