Commit ec9d263d authored by Oky Rahmanto's avatar Oky Rahmanto
Browse files

fix error duplicated code

parent b1cbcbe7
Pipeline #23486 passed with stages
in 6 minutes and 18 seconds
......@@ -249,25 +249,6 @@ class Users extends CI_Controller {
return $data;
function user_id($id){
//create a new cURL resource
$ch = curl_init($this->urluser."id/".$id);
//set the content type to application/json
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
//return response instead of outputting
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
//execute the POST request
$result = curl_exec($ch);
//close cURL resource
// echo 'HTTP code: ' . $httpcode;
echo $result;
function user_view(){
$data = $this->user_get();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment