$resetRoutes = $this->config->get( 'PasswordResetRoutes' );
$status = StatusValue::newGood();
- if ( !is_array( $resetRoutes ) ||
- !in_array( true, array_values( $resetRoutes ), true )
- ) {
+ if ( !is_array( $resetRoutes ) || !in_array( true, $resetRoutes, true ) ) {
// Maybe password resets are disabled, or there are no allowable routes
$status = StatusValue::newFatal( 'passwordreset-disabled' );
} elseif (
// Normal block. Maybe it was meant for someone else and the user just needs to log in;
// or maybe it was issued specifically to prevent some IP from messing with password
// reset? Go out on a limb and use the registration allowed flag to decide.
- return $block->prevents( 'createaccount' );
+ return $block->isCreateAccountBlocked();
} elseif ( $type === 'proxy' ) {
// we disallow actions through proxy even if the user is logged in
// so it makes sense to disallow password resets as well