diff options
Diffstat (limited to 'includes/api/ApiCreateAccount.php')
-rw-r--r-- | includes/api/ApiCreateAccount.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/includes/api/ApiCreateAccount.php b/includes/api/ApiCreateAccount.php index 55c60cce..69748c93 100644 --- a/includes/api/ApiCreateAccount.php +++ b/includes/api/ApiCreateAccount.php @@ -29,6 +29,10 @@ */ class ApiCreateAccount extends ApiBase { public function execute() { + // If we're in JSON callback mode, no tokens can be obtained + if ( !is_null( $this->getMain()->getRequest()->getVal( 'callback' ) ) ) { + $this->dieUsage( 'Cannot create account when using a callback', 'aborted' ); + } // $loginForm->addNewaccountInternal will throw exceptions // if wiki is read only (already handled by api), user is blocked or does not have rights. |