Before displaying an account creation form, checks against
GlobalBlocking are run, but not when the actual account is
created.
At this time, User::isBlockedFromCreateAccount() does not
run the hooks for which GlobalBlocking is registered.
Change-Id: Ieb3696bc49d6f4c4e3e95d8c55121b7ffa07b506
return false;
}
+ # Include checks that will include GlobalBlocking (Bug 38333)
+ $permErrors = $this->getTitle()->getUserPermissionsErrors( 'createaccount', $currentUser, true );
+ if ( count( $permErrors ) ) {
+ throw new PermissionsError( 'createaccount', $permErrors );
+ }
+
$ip = $this->getRequest()->getIP();
if ( $currentUser->isDnsBlacklisted( $ip, true /* check $wgProxyWhitelist */ ) ) {
$this->mainLoginForm( $this->msg( 'sorbs_create_account_reason' )->text() . ' ' . $this->msg( 'parentheses', $ip )->escaped() );