Commit 0c8bcff2 by Jansa Jose

authtoken

parent 242005f3
......@@ -51,7 +51,7 @@ 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){
if(!empty($custData) && $custData->num_rows() > 0 && $custData = $custData->row()){
$this->db->insert('authtable',array('customer_id'=>$id,'authtoken'=>$authToken));
} else {
$authToken = $custData->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