Commit e635a96a authored by Avris's avatar Avris

progress for 3.0

parent def50023
......@@ -13,8 +13,8 @@ class DoctrineUserProvider implements UserProviderInterface
$this->orm = $orm;
}
public function getUser($username)
public function getUser($identifier)
{
return $this->orm->findOneBy('User', 'username', $username);
return $this->orm->findOneBy('User', strpos($identifier, '@') === false ? 'username' : 'email', $identifier);
}
}
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