Ejemplo n.º 1
0
         $response['code'] = 15;
         $response['status'] = $user_model::$api_response_code[$response['code']]['HTTP Response'];
         $response['data'] = $user_model::$api_response_code[$response['code']]['Message'];
         $user_model->deliver_response($response);
     }
 } else {
     if (!empty($array['updateuser']) && !empty($array['user_id']) && !empty($array['user_name']) && !empty($array['email'])) {
         if (preg_match($user_model::$regular_expression['number'], $array['user_id']) && preg_match($user_model::$regular_expression['username'], $array['user_name']) && preg_match($user_model::$regular_expression['email'], $array['email'])) {
             $id = $array['user_id'];
             $username = $array['user_name'];
             $fullname = $array['fullname'];
             $gender = $array['gender'];
             $telephone = $array['telephone'];
             $address = $array['address'];
             $email = $array['email'];
             $user_model->updateUser($id, $username, $fullname, $gender, $telephone, $address, $email);
             $response['code'] = 0;
             $response['status'] = $user_model::$api_response_code[$response['code']]['HTTP Response'];
             $response['data'] = $user_model::$api_response_code[$response['code']]['Message'];
             $user_model->deliver_response($response);
         } else {
             $response['code'] = 15;
             $response['status'] = $user_model::$api_response_code[$response['code']]['HTTP Response'];
             $response['data'] = $user_model::$api_response_code[$response['code']]['Message'];
             $user_model->deliver_response($response);
         }
     } else {
         $response['code'] = 11;
         $response['status'] = $user_model::$api_response_code[$response['code']]['HTTP Response'];
         $response['data'] = $user_model::$api_response_code[$response['code']]['Message'];
         $user_model->deliver_response($response);