Commit ae83563a by Jansa Jose

Merge branch 'master' into 'dev_production'

authtoken in userlogin See merge request !25
parents e1c56851 e29a613d
......@@ -51,12 +51,11 @@ class Webservice_model extends CI_Model {
$static_string = time();
$authToken = 'Dcarfixs'.sha1($static_string);
$custData = $this->db->get_where('authtable',array('customer_id'=>$id));
if(empty($custData) && $custData->num_rows() < 0){
$this->db->insert('authtable',array('customer_id'=>$id,'authtoken'=>$authToken));
} else {
if(!empty($custData) && $custData->num_rows() > 0){
$custData = $custData->row();
print_r($custData);exit();
$authToken = $custData->authtoken;
} else {
$this->db->insert('authtable',array('customer_id'=>$id,'authtoken'=>$authToken));
}
return $authToken;
......
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