Commit 3d6589ce authored by Robert Nix's avatar Robert Nix
Browse files

Use MediaWiki User IDs for user identifiers

parent 54fba8b2
Pipeline #125776790 passed with stage
in 1 minute and 14 seconds
......@@ -12,7 +12,6 @@ declare(strict_types=1);
namespace Reverb;
use CentralIdLookup;
use User;
class UserIdHelper {
......@@ -24,8 +23,7 @@ class UserIdHelper {
* @return integer
*/
public static function getUserIdForService(User $user): int {
$lookup = CentralIdLookup::factory();
return $lookup->centralIdFromLocalUser($user, CentralIdLookup::AUDIENCE_RAW);
return $user->getId();
}
/**
......@@ -36,7 +34,6 @@ class UserIdHelper {
* @return User|null
*/
public static function getUserForServiceUserId(int $serviceUserId): ?User {
$lookup = CentralIdLookup::factory();
return $lookup->localUserFromCentralId($serviceUserId);
return User::newFromId($serviceUserId);
}
}
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