This seems to be mixing UI and backend code.
Further I'm unsure we want to treat authplugin autocreations as "new accounts" for this purpose; since they *have* been previously created and perhaps approved, just blindly running it through the same abort hook again will be a huge pain in the butt, for instance for those who had to go through admin approval due to a machine-detected name spoof conflict or an IP blocking issue. If an abort is appropriate, it should probably be a distinct hook so it can be treated differently.
return self::CREATE_BLOCKED;
}
- $abortError = '';
- if( !wfRunHooks( 'AbortNewAccount', array( $user->getName(), &$abortError ) ) ) {
- // Hook point to add extra creation throttles and blocks
- wfDebug( __METHOD__.": a hook blocked creation\n" );
- $this->mainLoginForm( $abortError );
- return self::ABORTED;
- }
-
wfDebug( __METHOD__.": creating account\n" );
$user = $this->initUser( $user, true );
return self::SUCCESS;