30 parent::__construct( $main, $action );
35 if ( !$this->tempUserCreator->isEnabled() ) {
36 $this->
dieWithError(
'apierror-tempuserdisabled',
'tempuserdisabled' );
38 if ( $this->
getUser()->isRegistered() ) {
39 $this->
dieWithError(
'apierror-alreadyregistered',
'alreadyregistered' );
45 $name = $this->tempUserCreator->acquireAndStashName( $session );
46 if ( $name ===
null ) {
47 $this->
dieWithError(
'apierror-tempuseracquirefailed',
'tempuseracquirefailed' );
66class_alias( ApiAcquireTempUserName::class,
'ApiAcquireTempUserName' );
This is the main API class, used for both external and internal processing.