32 parent::__construct( $main, $action );
33 $this->tempUserCreator = $tempUserCreator;
38 if ( !$this->tempUserCreator->isEnabled() ) {
39 $this->
dieWithError(
'apierror-tempuserdisabled',
'tempuserdisabled' );
41 if ( $this->
getUser()->isRegistered() ) {
42 $this->
dieWithError(
'apierror-alreadyregistered',
'alreadyregistered' );
48 $name = $this->tempUserCreator->acquireAndStashName( $session );
49 if ( $name ===
null ) {
50 $this->
dieWithError(
'apierror-tempuseracquirefailed',
'tempuseracquirefailed' );
69class_alias( ApiAcquireTempUserName::class,
'ApiAcquireTempUserName' );
This is the main API class, used for both external and internal processing.