Commit cfe9bbc6 by Tobin

dc

parent 79c19189
......@@ -476,7 +476,7 @@ class Organizer_model extends CI_Model {
try{
$userNameChk = $this->db->query("SELECT * FROM users
WHERE status!='2' AND
username='".$data['username']."'");
username='".$data['email_id']."'");
if(!empty($userNameChk) && $userNameChk->num_rows() > 0){
$res = array('status'=>0,'message'=>'Username Already Exist','code'=>'ER07');
return $res;
......@@ -490,7 +490,7 @@ class Organizer_model extends CI_Model {
$res = array('status'=>0,'message'=>'Phone Number Already Exist','code'=>'ER09');
return $res;
}
$this->db->insert('users',array('username'=>$data['username'],'display_name'=>$data['username'],
$this->db->insert('users',array('username'=>$data['email_id'],'display_name'=>$data['username'],
'password'=>md5($data['password']),'user_type'=>'2','status'=>'3'));
$last_id = $this->db->insert_id();
if($this->db->insert('provider',array('provider_id'=>$last_id,'name'=>$data['username'],
......
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