return $this->getPasswordValidity( $password ) === true;
}
-
/**
* Given unvalidated password input, return error message on failure.
*
);
}
+ /**
+ * Check whether to enable new files patrol features for this user
+ * @return bool True or false
+ */
+ public function useFilePatrol() {
+ global $wgUseRCPatrol, $wgUseFilePatrol;
+ return (
+ ( $wgUseRCPatrol || $wgUseFilePatrol )
+ && ( $this->isAllowedAny( 'patrol', 'patrolmarks' ) )
+ );
+ }
+
/**
* Get the WebRequest object to use with this object
*
}
}
- /**
- * Get the current skin, loading it if required
- * @return Skin The current skin
- * @todo FIXME: Need to check the old failback system [AV]
- * @deprecated since 1.18 Use ->getSkin() in the most relevant outputting context you have
- */
- public function getSkin() {
- wfDeprecated( __METHOD__, '1.18' );
- return RequestContext::getMain()->getSkin();
- }
-
/**
* Get a WatchedItem for this user and $title.
*
}
}
- /**
- * Alias for getEditToken.
- * @deprecated since 1.19, use getEditToken instead.
- *
- * @param string|array $salt Array of Strings Optional function-specific data for hashing
- * @param WebRequest|null $request WebRequest object to use or null to use $wgRequest
- * @return string The new edit token
- */
- public function editToken( $salt = '', $request = null ) {
- wfDeprecated( __METHOD__, '1.19' );
- return $this->getEditToken( $salt, $request );
- }
-
/**
* Internal implementation for self::getEditToken() and
* self::matchEditToken().
$salt, $request ?: $this->getRequest(), $timestamp
);
- if ( $val != $sessionToken ) {
+ if ( !hash_equals( $sessionToken, $val ) ) {
wfDebug( "User::matchEditToken: broken session data\n" );
}