That API field exposes AuthManager::canCreateAccount, where the error
message is important.
Change-Id: Idef441b311b94ff0cb6c4deaed1ac93959ee7ee8
} else {
$data[$u]['missing'] = true;
if ( isset( $this->prop['cancreate'] ) && !$this->getConfig()->get( 'DisableAuthManager' ) ) {
- $data[$u]['cancreate'] = MediaWiki\Auth\AuthManager::singleton()->canCreateAccount( $u )
- ->isGood();
+ $status = MediaWiki\Auth\AuthManager::singleton()->canCreateAccount( $u );
+ $data[$u]['cancreate'] = $status->isGood();
+ if ( !$status->isGood() ) {
+ $data[$u]['cancreateerror'] = $this->getErrorFormatter()->arrayFromStatus( $status );
+ }
}
}
} else {