46 parent::__construct( $main, $action );
47 $this->tempUserCreator = $tempUserCreator;
52 if ( !$this->tempUserCreator->isEnabled() ) {
53 $this->
dieWithError(
'apierror-tempuserdisabled',
'tempuserdisabled' );
55 if ( $this->
getUser()->isRegistered() ) {
56 $this->
dieWithError(
'apierror-alreadyregistered',
'alreadyregistered' );
62 $name = $this->tempUserCreator->acquireAndStashName( $session );
63 if ( $name ===
null ) {
64 $this->
dieWithError(
'apierror-tempuseracquirefailed',
'tempuseracquirefailed' );
81class_alias( ApiAcquireTempUserName::class,
'ApiAcquireTempUserName' );
This is the main API class, used for both external and internal processing.