]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - includes/auth/CreationReasonAuthenticationRequest.php
MediaWiki 1.30.2
[autoinstallsdev/mediawiki.git] / includes / auth / CreationReasonAuthenticationRequest.php
diff --git a/includes/auth/CreationReasonAuthenticationRequest.php b/includes/auth/CreationReasonAuthenticationRequest.php
new file mode 100644 (file)
index 0000000..146470e
--- /dev/null
@@ -0,0 +1,24 @@
+<?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' ),
+                       ],
+               ];
+       }
+}