Exemplo n.º 1
0
 public function voteUp($user_id)
 {
     $user = sfGuardUserProfilePeer::retrieveByUserId($user_id);
     if ($user == null) {
         return false;
     }
     $this->setPoints($this->getPoints() + $user->getUserVotingPoints());
     $this->save();
     if ($this->getPoints() > sfConfig::get('app_project_application_approval_threshold')) {
         $this->CommunityApprove();
     }
 }