- // Use $wgUser is possible; allows to skip a lot of code
- if ( is_object( $wgUser ) && $wgUser->getName() == $userName ) {
- $user = $wgUser;
- } else {
- $user = User::newFromName( $userName );
- if ( !$user instanceof User ) {
- return array();
- }