Commit a876dc1e by Jansa Jose

check availability

parent 529a77e6
...@@ -441,7 +441,7 @@ class Webservice extends CI_Controller { ...@@ -441,7 +441,7 @@ class Webservice extends CI_Controller {
// if(isset($data['username']) && strlen($data['username'])){ // if(isset($data['username']) && strlen($data['username'])){
// } // }
// if(isset($data['username']) && strlen($data['username']) && isset($data['email']) && strlen($data['email'])) if((isset($data['username']) && strlen($data['username'])) || (isset($data['email']) && strlen($data['email']))){
// { // {
$type = 'user'; $type = 'user';
$check_result = $this->Webservice_model->dataExist($data,$type); $check_result = $this->Webservice_model->dataExist($data,$type);
...@@ -494,6 +494,13 @@ class Webservice extends CI_Controller { ...@@ -494,6 +494,13 @@ class Webservice extends CI_Controller {
"data"=> $return_data "data"=> $return_data
); );
} }
}else{
$res = array(
"status"=> "error",
"error"=> "required",
"message"=> "Data is required for checking"
);
}
print json_encode($res); print json_encode($res);
} }
......
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