Esempio n. 1
0
 function register($event, &$data)
 {
     if (Configure::read('profile.shirt_size') == PROFILE_REGISTRATION) {
         $profile = $this->_extractAnswers($data, array('shirt_size' => SHIRT_SIZE));
         if (!empty($profile)) {
             $this->_controller->Person->id = $this->_controller->UserCache->currentId();
             // If it fails, it fails. We're not going to reject the registration because of it.
             $this->_controller->Person->save($profile);
         }
     }
     return parent::register($event, $data);
 }
Esempio n. 2
0
 function franchise_unique($check)
 {
     // $check array is passed using the form field name as the key
     // have to extract the value to make the function generic
     $value = current(array_values($check));
     $value = $value['answer_id'];
     // -1 means make a new one with the same name as the team
     if ($value == -1) {
         $name = EventTypeComponent::_extractAnswer($this->data, TEAM_NAME);
         return $this->notinquery(array(array('answer' => $name)), 'Franchise', 'name');
     }
     return true;
 }
Esempio n. 3
0
 function longDescription($data)
 {
     $team = $this->_extractAnswer($data, TEAM_NAME);
     return parent::longDescription($data) . ": {$team}";
 }
Esempio n. 4
0
 function longDescription($data)
 {
     return parent::longDescription($data) . ": Valid from {$data['Event']['membership_begins']} to {$data['Event']['membership_ends']}";
 }