Path: blob/master/src/applications/auth/controller/PhabricatorAuthNeedsApprovalController.php
12262 views
<?php12final class PhabricatorAuthNeedsApprovalController3extends PhabricatorAuthController {45public function shouldRequireLogin() {6return false;7}89public function shouldRequireEmailVerification() {10return false;11}1213public function shouldRequireEnabledUser() {14return false;15}1617public function handleRequest(AphrontRequest $request) {18$viewer = $this->getViewer();1920$instructions = $this->newCustomWaitForApprovalInstructions();2122$wait_for_approval = pht(23"Your account has been created, but needs to be activated by an ".24"administrator. Due to lots of spam accounts, in order to have it activated, " .25"Please send an email to <phabric-admin AT FreeBSD.org> " .26"from the registered email address and briefly describe your plan for using your account " .27"as https://reviews.FreeBSD.org/auth/register/ described. " .28"You'll receive an email once your account is approved.");2930$dialog = $this->newDialog()31->setTitle(pht('Wait for Approval'))32->appendChild($wait_for_approval)33->addCancelButton('/', pht('Wait Patiently'));3435$crumbs = $this->buildApplicationCrumbs()36->addTextCrumb(pht('Wait For Approval'))37->setBorder(true);3839return $this->newPage()40->setTitle(pht('Wait For Approval'))41->setCrumbs($crumbs)42->appendChild(43array(44$instructions,45$dialog,46));4748}4950private function newCustomWaitForApprovalInstructions() {51$viewer = $this->getViewer();5253$text = PhabricatorAuthMessage::loadMessageText(54$viewer,55PhabricatorAuthWaitForApprovalMessageType::MESSAGEKEY);5657if (!strlen($text)) {58return null;59}6061$remarkup_view = new PHUIRemarkupView($viewer, $text);6263return phutil_tag(64'div',65array(66'class' => 'auth-custom-message',67),68$remarkup_view);69}7071}727374