Beispiel #1
0
     $objValid->add2Errors('uni');
 }
 if (!empty($uni) && empty($grad_year_u)) {
     $objValid->add2Errors('grad_year_u');
 }
 if ($objMember->isDuplicateEmail($email)) {
     $objValid->add2Errors('duplicate_email');
 }
 $params = $objValid->objForm->getPostArray($objValid->_expected);
 if (!empty($high_school)) {
     $get_high_school = $objSchool->getSchoolByName(trim($high_school), true);
     if (!empty($get_high_school)) {
         $high_school_id = $get_high_school['id'];
         $params['high_school'] = $high_school_id;
     } else {
         $new_high_school = $objSchool->addHighSchool(array('name' => trim($high_school)));
         if (!empty($new_high_school)) {
             $high_school_id = $new_high_school['id'];
             $params['high_school'] = $high_school_id;
         } else {
             $success = false;
         }
     }
 }
 if (!empty($uni)) {
     $get_uni = $objSchool->getSchoolByName(trim($uni));
     if (!empty($get_uni)) {
         $uni_id = $get_uni['id'];
         $params['uni'] = $uni_id;
     } else {
         $new_uni = $objSchool->addUni(array('name' => trim($uni)));