wiki.techinc.nl/includes/auth/CreationReasonAuthenticationRequest.php
Gergő Tisza d0e6051b5c Fix required field calculation in AuthenticationRequest
Instead of only flagging fields which are required by a request
needed by all primairy providers, it should be enough if all
requests needed by some primary provider require that field.

Also make CreationReasonAuthenticationRequest non-required so that
the list of required form fields is more in sync with that of
pre-AuthManager code.

Bug: T85853
Change-Id: I9d33bd22295758cc532a260b1848616b41d94f12
2016-05-30 11:57:58 +00:00

24 lines
569 B
PHP

<?php
namespace MediaWiki\Auth;
/**
* Authentication request for the reason given for account creation.
* Used in logs and for notification.
*/
class CreationReasonAuthenticationRequest extends AuthenticationRequest {
/** @var string Account creation reason (only used when creating for someone else) */
public $reason;
public $required = self::OPTIONAL;
public function getFieldInfo() {
return [
'reason' => [
'type' => 'string',
'label' => wfMessage( 'createacct-reason' ),
'help' => wfMessage( 'createacct-reason-help' ),
],
];
}
}