// Is the IP user able to create accounts?
$anon = new User;
- if ( !$anon->isAllowedAny( 'createaccount', 'autocreateaccount' ) ) {
+ if ( $source !== self::AUTOCREATE_SOURCE_MAINT &&
+ !$anon->isAllowedAny( 'createaccount', 'autocreateaccount' )
+ ) {
$this->logger->debug( __METHOD__ . ': IP lacks the ability to create or autocreate accounts', [
'username' => $username,
'ip' => $anon->getName(),