);
if ( !$row ) {
// No user. Create it?
- return $options['create'] ? self::createNew( $name ) : null;
+ return $options['create'] ? self::createNew( $name, [ 'token' => self::INVALID_TOKEN ] ) : null;
}
$user = self::newFromRow( $row );
return $name;
}
- /**
- * Count the number of edits of a user
- *
- * @param int $uid User ID to check
- * @return int The user's edit count
- *
- * @deprecated since 1.21 in favour of User::getEditCount
- */
- public static function edits( $uid ) {
- wfDeprecated( __METHOD__, '1.21' );
- $user = self::newFromId( $uid );
- return $user->getEditCount();
- }
-
/**
* Return a random password.
*
* @param string $oname The option to check
* @param string $defaultOverride A default value returned if the option does not exist
* @param bool $ignoreHidden Whether to ignore the effects of $wgHiddenPrefs
- * @return string User's current value for the option
+ * @return string|null User's current value for the option
* @see getBoolOption()
* @see getIntOption()
*/