UserInfo getByID method deprecated

Since the static method of the UserInfo object “getByID” is deprecated, what do I have to use instead?

Example:
$ui = UserInfo::getByID(3);

Documentation

See

$ui = $app->make(\Concrete\Core\User\UserInfoRepository::class)->getByID();

As a general tactic, if you look at the source of any deprecated method, you will usually see a one liner mapping it to the replacement.

1 Like

That really helps. Thanks for the hint!