public function send_to_me()
 {
     debug("Action Send to me");
     $user = need_authentication();
     mail_advertise($_SESSION["event_id"], $user->email, $this->id);
 }
Example #2
0
 public function can_be_retrieved()
 {
     $user = need_authentication();
     $event = Event::get_from_id($this->event_id);
     if (is_admin_logged() || $this->user_id == $user->id || $event->user_id == $user->id) {
         debug("Can administrate.");
         return TRUE;
     }
     debug("Cannot administrate.");
     return FALSE;
 }