%PDF- <> %âãÏÓ endobj 2 0 obj <> endobj 3 0 obj <>/ExtGState<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI] >>/Annots[ 28 0 R 29 0 R] /MediaBox[ 0 0 595.5 842.25] /Contents 4 0 R/Group<>/Tabs/S>> endobj ºaâÚÎΞ-ÌE1ÍØÄ÷{òò2ÿ ÛÖ^ÔÀá TÎ{¦?§®¥kuµùÕ5sLOšuY>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<>endobj 2 0 obj<> endobj 2 0 obj<>endobj 2 0 obj<>es 3 0 R>> endobj 2 0 obj<> ox[ 0.000000 0.000000 609.600000 935.600000]/Fi endobj 3 0 obj<> endobj 7 1 obj<>/ProcSet[/PDF/Text/ImageB/ImageC/ImageI]>>/Subtype/Form>> stream
<?php class Auth_model extends CI_Model { public function __construct() { parent::__construct(); } public function registerVendor($post) { $input = array( 'email' => trim($post['u_email']), 'password' => password_hash($post['u_password'], PASSWORD_DEFAULT), 'pan_card' => $post['pan_card'] ); if (!$this->db->insert('vendors', $input)) { log_message('error', print_r($this->db->error(), true)); show_error(lang('database_error')); } } public function countVendorsWithEmail($email) { $this->db->where('email', $email); return $this->db->count_all_results('vendors'); } public function checkVendorExsists($post) { $this->db->where('email', $post['u_email']); $this->db->where('approved', '1'); $this->db->where('status', '1'); $query = $this->db->get('vendors'); $row = $query->row_array(); //echo $this->db->last_query();die; if (empty($row) || !password_verify($post['u_password'], $row['password'])) { return false; } return true; } public function changePassword($post) { if(isset($post['u_email'])){ $this->db->where('email', $post['u_email']); } else{ $this->db->where('id', $post['vendor_id']); } if(!$result = $this->db->update('vendors', array('password' => password_hash($post['u_password'], PASSWORD_DEFAULT)))){ return False; } //echo $this->db->last_query();die; return True; } }