本文整理匯總了PHP中PilotData::RejectPilot方法的典型用法代碼示例。如果您正苦於以下問題:PHP PilotData::RejectPilot方法的具體用法?PHP PilotData::RejectPilot怎麽用?PHP PilotData::RejectPilot使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PilotData
的用法示例。
在下文中一共展示了PilotData::RejectPilot方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: RejectPilot
protected function RejectPilot()
{
$pilot = PilotData::GetPilotData($this->post->id);
# Send pilot notification
$subject = Lang::gs('email.register.rejected.subject');
$this->set('pilot', $pilot);
$message = Template::Get('email_registrationdenied.tpl', true, true, true);
Util::SendEmail($pilot->email, $subject, $message);
# Reject in the end, since it's delted
PilotData::RejectPilot($this->post->id);
CodonEvent::Dispatch('pilot_rejected', 'PilotAdmin', $pilot);
LogData::addLog(Auth::$userinfo->pilotid, 'Approved ' . PilotData::getPilotCode($pilot->code, $pilot->pilotid) . ' - ' . $pilot->firstname . ' ' . $pilot->lastname);
}
示例2: RejectPilot
/**
* PilotAdmin::RejectPilot()
*
* @return
*/
protected function RejectPilot()
{
$this->checkPermission(MODERATE_REGISTRATIONS);
$pilot = PilotData::GetPilotData($this->post->id);
# Send pilot notification
$subject = Lang::gs('email.register.rejected.subject');
$this->set('pilot', $pilot);
$oldPath = Template::setTemplatePath(TEMPLATES_PATH);
$oldSkinPath = Template::setSkinPath(ACTIVE_SKIN_PATH);
$message = Template::Get('email_registrationdenied.php', true, true, true);
Template::setTemplatePath($oldPath);
Template::setSkinPath($oldSkinPath);
Util::SendEmail($pilot->email, $subject, $message);
# Reject in the end, since it's delted
PilotData::RejectPilot($this->post->id);
CodonEvent::Dispatch('pilot_rejected', 'PilotAdmin', $pilot);
LogData::addLog(Auth::$userinfo->pilotid, 'Approved ' . PilotData::getPilotCode($pilot->code, $pilot->pilotid) . ' - ' . $pilot->firstname . ' ' . $pilot->lastname);
}