'deletelogentry',
'deleterevision',
'edit',
+ 'editcontentmodel',
'editinterface',
'editprotected',
'editmyoptions',
* @return int|null The corresponding user's ID, or null if user is nonexistent
*/
public static function idFromName( $name ) {
- // We don't want to call Title::makeTitleSafe yet, since that call path
- // ends up needing the user language, which ends up trying to load the
- // user object, which ends up back here (bug 54193).
- $nt = Title::makeTitle( NS_USER, $name );
+ $nt = Title::makeTitleSafe( NS_USER, $name );
+ if ( is_null( $nt ) ) {
+ // Illegal name
+ return null;
+ }
+
if ( isset( self::$idCacheByName[$name] ) ) {
return self::$idCacheByName[$name];
}
global $wgImplicitGroups;
$groups = $wgImplicitGroups;
- # Deprecated, use $wgImplictGroups instead
- wfRunHooks( 'UserGetImplicitGroups', array( &$groups ) );
+ # Deprecated, use $wgImplicitGroups instead
+ wfRunHooks( 'UserGetImplicitGroups', array( &$groups ), '1.25' );
return $groups;
}
}
$title = self::getGroupPage( $group );
if ( $title ) {
- $page = $title->getPrefixedText();
+ $page = $title->getFullText();
return "[[$page|$text]]";
} else {
return $text;