$result = array();
if ( $status->isGood() ) {
// Success!
- global $wgEmailAuthentication;
$user = $status->getValue();
if ( $params['language'] ) {
'createaccount-title',
'createaccount-text'
) );
- } elseif ( $wgEmailAuthentication && Sanitizer::validateEmail( $user->getEmail() ) ) {
+ } elseif ( $this->getConfig()->get( 'EmailAuthentication' ) && Sanitizer::validateEmail( $user->getEmail() ) ) {
// Send out an email authentication message if needed
$status->merge( $user->sendConfirmationMail() );
}
}
public function getAllowedParams() {
- global $wgEmailConfirmToEdit;
-
return array(
'name' => array(
ApiBase::PARAM_TYPE => 'user',
'token' => null,
'email' => array(
ApiBase::PARAM_TYPE => 'string',
- ApiBase::PARAM_REQUIRED => $wgEmailConfirmToEdit
+ ApiBase::PARAM_REQUIRED => $this->getConfig()->get( 'EmailConfirmToEdit' ),
),
'realname' => null,
'mailpassword' => array(
);
// 'passwordtooshort' has parameters. :(
- global $wgMinimalPasswordLength;
$errors[] = array(
'code' => 'passwordtooshort',
- 'info' => wfMessage( 'passwordtooshort', $wgMinimalPasswordLength )
+ 'info' => wfMessage( 'passwordtooshort', $this->getConfig()->get( 'MinimalPasswordLength' ) )
->inLanguage( 'en' )->useDatabase( false )->parse()
);