/** * Returns the status and User element * * @param string $username name of user * @return array|bool Array containing the status and User object */ public static function getUserInfoFromString( $username ) { // We create an user object using name of user parsed from title $user = User::newFromName( $username ); // Invalid user if ( !($user instanceof User) ) { return false; } if ( !self::isValid( $user ) ) { return false; } $status = OnlineStatusBar_StatusCheck::getStatus( $user ); return array( $status, $user ); }