HOME


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

class MyAuthentication extends CI_Model{


public function login_authentication($email,$pwd){
        $this->db->select("*");
        $this->db->where('email',$email);
        $this->db->where('password',$pwd);
        $this->db->from('user');
        $query = $this->db->get();
        if($query->num_rows()==1){
           $row=$query->row();   
                $data = array(
                            'auth_id'=> $row->user_id,
                            'client_auth_user'=> $row->full_name,
                            'client_auth_email'=> $row->email,
                            'admin_logged_in'=>TRUE,
                        );

            $this->session->set_userdata($data);
            return TRUE;
        }
        else{
            return FALSE;
      }
    }
}