2011-05-12 10:06:54 -07:00
|
|
|
<?php
|
|
|
|
|
2012-03-09 15:46:25 -08:00
|
|
|
final class PhabricatorDisabledUserController
|
|
|
|
extends PhabricatorAuthController {
|
2011-05-12 10:06:54 -07:00
|
|
|
|
|
|
|
public function shouldRequireEnabledUser() {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function processRequest() {
|
|
|
|
$request = $this->getRequest();
|
|
|
|
$user = $request->getUser();
|
|
|
|
if (!$user->getIsDisabled()) {
|
|
|
|
return new Aphront404Response();
|
|
|
|
}
|
|
|
|
|
|
|
|
$failure_view = new AphrontRequestFailureView();
|
|
|
|
$failure_view->setHeader('Account Disabled');
|
|
|
|
$failure_view->appendChild('<p>Your account has been disabled.</p>');
|
|
|
|
|
|
|
|
return $this->buildStandardPageResponse(
|
|
|
|
$failure_view,
|
|
|
|
array(
|
|
|
|
'title' => 'Account Disabled',
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|