public function checkPermissions() { parent::checkPermissions(); $user = $this->getUser(); $status = AuthManager::singleton()->checkAccountCreatePermissions($user); if (!$status->isGood()) { throw new ErrorPageError('createacct-error', $status->getMessage()); } }
protected function beforeExecute($subPage) { if ($subPage === 'signup' || $this->getRequest()->getText('type') === 'signup') { // B/C for old account creation URLs $title = SpecialPage::getTitleFor('CreateAccount'); $query = array_diff_key($this->getRequest()->getValues(), array_fill_keys(['type', 'title'], true)); $url = $title->getFullURL($query, false, PROTO_CURRENT); $this->getOutput()->redirect($url); return false; } return parent::beforeExecute($subPage); }