本文整理匯總了PHP中PhabricatorUser::getIsStandardUser方法的典型用法代碼示例。如果您正苦於以下問題:PHP PhabricatorUser::getIsStandardUser方法的具體用法?PHP PhabricatorUser::getIsStandardUser怎麽用?PHP PhabricatorUser::getIsStandardUser使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PhabricatorUser
的用法示例。
在下文中一共展示了PhabricatorUser::getIsStandardUser方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: validateSender
public function validateSender(PhabricatorMetaMTAReceivedMail $mail, PhabricatorUser $sender)
{
$failure_reason = null;
if ($sender->getIsDisabled()) {
$failure_reason = pht('Your account (%s) is disabled, so you can not interact with ' . 'Phabricator over email.', $sender->getUsername());
} else {
if ($sender->getIsStandardUser()) {
if (!$sender->getIsApproved()) {
$failure_reason = pht('Your account (%s) has not been approved yet. You can not interact ' . 'with Phabricator over email until your account is approved.', $sender->getUsername());
} else {
if (PhabricatorUserEmail::isEmailVerificationRequired() && !$sender->getIsEmailVerified()) {
$failure_reason = pht('You have not verified the email address for your account (%s). ' . 'You must verify your email address before you can interact ' . 'with Phabricator over email.', $sender->getUsername());
}
}
}
}
if ($failure_reason) {
throw new PhabricatorMetaMTAReceivedMailProcessingException(MetaMTAReceivedMailStatus::STATUS_DISABLED_SENDER, $failure_reason);
}
}