Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
CRAP
0.00% covered (danger)
0.00%
0 / 1
MWCA
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
2
0.00% covered (danger)
0.00%
0 / 1
 user
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
2
1<?php
2
3// This class is intentionally not in the normal CentralAuth namespace, for easy access.
4
5use MediaWiki\Extension\CentralAuth\User\CentralAuthUser;
6
7/**
8 * Debug helper class for CentralAuth.
9 * @see MW
10 * @internal must not be used in code, anywhere
11 */
12class MWCA {
13
14    public static function user( string $username ): CentralAuthUser {
15        $cu = CentralAuthUser::getPrimaryInstanceByName( $username );
16        // Make sure the data is loaded
17        $cu->getId();
18        return $cu;
19    }
20
21}