HOME


sh-3ll 1.0
DIR:/proc/self/cwd/application/models/pages/
Upload File :
Current File : //proc/self/cwd/application/models/pages/AccountModel.php
<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class AccountModel extends CI_Model{



	public function getClientInfoProcessing($id) {

		$this->db->select("a.`client_id`, a.`firstname`, a.`lastname`,  b.`company_name`, a.`email`");
		$this->db->join('hcs_company as b', 'a.company_id = b.company_id');
		$this->db->where('a.client_id',$id);
		$query = $this->db->get('hcs_company_user a');

		echo json_encode($query->row());


	}    

	public function checkProfileUniqueEmail($auth_id,$email){
		$this->db->select("*");
		$this->db->where('email',$email);
		$this->db->where_not_in('client_id',$auth_id);
		$query = $this->db->get('hcs_company_user');
		if($query->num_rows() >0){
            return false;
        }
        else{
            return true;
        }
	}


}