Example #1
0
         $user_model->delete($id);
         $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 {
     if (!empty($array['mouser']) && !empty($array['user_id'])) {
         if (preg_match($user_model::$regular_expression['number'], $array['user_id'])) {
             $id = $array['user_id'];
             $user_model->moUser($id);
             $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 {
         if (!empty($array['banuser']) && !empty($array['user_id'])) {
             if (preg_match($user_model::$regular_expression['number'], $array['user_id'])) {
                 $id = $array['user_id'];
                 $user_model->banUser($id);