Esempio n. 1
0
 public function userVote($answer_nr)
 {
     if (!$this->m_data['allow_not_logged_in']) {
         $vote = new DebateVote($this->m_data['debate_nr'], $answer_nr, $this->userId);
         if (is_numeric($vote->m_data['id_vote'])) {
             $this->alreadyVoted = $vote->m_data['fk_answer_nr'];
         }
         $vote->create();
     }
     return false;
 }