$bits = wfParseUrl( $params['returnurl'] );
if ( !$bits || $bits['scheme'] === '' ) {
$encParamName = $this->encodeParamName( 'returnurl' );
- $this->dieUsage(
- "Invalid value '{$params['returnurl']}' for url parameter $encParamName",
+ $this->dieWithError(
+ [ 'apierror-badurl', $encParamName, wfEscapeWikiText( $params['returnurl'] ) ],
"badurl_{$encParamName}"
);
}
$this->getResult()->addValue( null, 'clientlogin', $helper->formatAuthenticationResponse(
AuthenticationResponse::newFail( $this->msg( 'userlogin-cannot-' . AuthManager::ACTION_LOGIN ) )
) );
+ $helper->logAuthenticationResult( 'login', 'userlogin-cannot-' . AuthManager::ACTION_LOGIN );
return;
}
$this->getResult()->addValue( null, 'clientlogin',
$helper->formatAuthenticationResponse( $res ) );
+ $helper->logAuthenticationResult( 'login', $res );
}
public function isReadMode() {