本文整理汇总了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);
}