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); }
/** * 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); }