예제 #1
0
 /**
  * 
  * @param WOOOF $wo
  * @param array $in
  * @return [ 'saveOk' => bool, 'userId' => id, 'errors' => array ]
  */
 public static function mainInfoSave(WOOOF $wo, $in)
 {
     $place = __CLASS__ . '::' . __FUNCTION__;
     if ($wo->userData['id'] == '0123456789') {
         $wo->handleShowStopperError('505');
     }
     $res = VO_Users::saveMainInfo($wo, $in);
     if ($res === FALSE) {
         $out = ['saveOk' => false, 'errors' => $wo->getErrorsAsArrayAndClear()];
         $wo->db->rollback();
     } else {
         $out = ['saveOk' => true, 'userId' => $res];
         $wo->db->commit();
     }
     return $out;
 }