jenkins-bot has submitted this change and it was merged.
Change subject: Revert "Add a hook to validate account creation fields."
......................................................................
Revert "Add a hook to validate account creation fields."
Change adds a hook that serves exactly the same purpose as
AbortNewAccount. Also change was merged prematurely and is
missing message documentation as well as having some minor
code flow issues.
This reverts commit cc1006b77c6dfdc53266e0bfc73fc9daf304f8e7.
Change-Id: I8656aa1a99c84778fd85ec7da9d6ce23bd6cf9b9
---
M docs/hooks.txt
M includes/specials/SpecialUserlogin.php
M languages/messages/MessagesEn.php
3 files changed, 0 insertions(+), 15 deletions(-)
Approvals:
Raimond Spekking: Looks good to me, approved
jenkins-bot: Verified
diff --git a/docs/hooks.txt b/docs/hooks.txt
index 700f765..7bd725a 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -295,10 +295,6 @@
$user: the User object that was created. (Parameter added in 1.7)
$byEmail: true when account was created "by email" (added in 1.12)
-'ValidateNewUser': Before user account is created, check account settings
-$user: the User object to be created.
-$&error: Error message, if any, returned by failed validation
-
'AfterFinalPageOutput': At the end of OutputPage::output() but before final
ob_end_flush() which will send the buffered output to the client. This allows
for last-minute modification of the output within the buffer by using
diff --git a/includes/specials/SpecialUserlogin.php
b/includes/specials/SpecialUserlogin.php
index c8944d2..f40966c 100644
--- a/includes/specials/SpecialUserlogin.php
+++ b/includes/specials/SpecialUserlogin.php
@@ -409,16 +409,6 @@
return Status::newFatal( 'userexists' );
}
- $validateError = '';
- // Make sure that our extensions like the input for this user
- if ( !wfRunHooks( 'ValidateNewUser', array( $u, &$validateError
) ) ) {
- wfDebug( "New user failed hook validation.\n" );
- if ( !$validateError ) {
- return Status::newFatal( 'newuserfailedvalidation'
);
- }
- return Status::newFatal( $validateError );
- }
-
if ( $this->mCreateaccountMail ) {
# do not force a password for account creation by email
# set invalid password, it will be replaced later by a
random generated password
diff --git a/languages/messages/MessagesEn.php
b/languages/messages/MessagesEn.php
index 5614015..39f0b8a 100644
--- a/languages/messages/MessagesEn.php
+++ b/languages/messages/MessagesEn.php
@@ -1169,7 +1169,6 @@
'badretype' => 'The passwords you entered do not match.',
'userexists' => 'Username entered already in use.
Please choose a different name.',
-'newuserfailedvalidation' => 'Your new account settings are invalid.',
'loginerror' => 'Login error',
'createacct-error' => 'Account creation error',
'createaccounterror' => 'Could not create account: $1',
--
To view, visit https://gerrit.wikimedia.org/r/94590
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I8656aa1a99c84778fd85ec7da9d6ce23bd6cf9b9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Parent5446 <[email protected]>
Gerrit-Reviewer: Andrew Bogott <[email protected]>
Gerrit-Reviewer: Legoktm <[email protected]>
Gerrit-Reviewer: MaxSem <[email protected]>
Gerrit-Reviewer: Raimond Spekking <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: coren <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits