Page MenuHomePhorge

PhabricatorAuthNeedsApprovalController.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

PhabricatorAuthNeedsApprovalController.php

<?php
final class PhabricatorAuthNeedsApprovalController
extends PhabricatorAuthController {
public function shouldRequireLogin() {
return false;
}
public function shouldRequireEmailVerification() {
return false;
}
public function shouldRequireEnabledUser() {
return false;
}
public function handleRequest(AphrontRequest $request) {
$viewer = $this->getViewer();
$instructions = $this->newCustomWaitForApprovalInstructions();
$wait_for_approval = pht(
"Your account has been created, but needs to be approved by an ".
"administrator. You'll receive an email once your account is approved.");
$dialog = $this->newDialog()
->setTitle(pht('Wait for Approval'))
->appendChild($wait_for_approval)
->addCancelButton('/', pht('Wait Patiently'));
$crumbs = $this->buildApplicationCrumbs()
->addTextCrumb(pht('Wait For Approval'))
->setBorder(true);
return $this->newPage()
->setTitle(pht('Wait For Approval'))
->setCrumbs($crumbs)
->appendChild(
array(
$instructions,
$dialog,
));
}
private function newCustomWaitForApprovalInstructions() {
$viewer = $this->getViewer();
$text = PhabricatorAuthMessage::loadMessageText(
$viewer,
PhabricatorAuthWaitForApprovalMessageType::MESSAGEKEY);
if (!phutil_nonempty_string($text)) {
return null;
}
$remarkup_view = new PHUIRemarkupView($viewer, $text);
return phutil_tag(
'div',
array(
'class' => 'auth-custom-message',
),
$remarkup_view);
}
}

File Metadata

Mime Type
text/x-php
Expires
Mon, May 12, 8:56 AM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
108437
Default Alt Text
PhabricatorAuthNeedsApprovalController.php (1 KB)

Event Timeline