D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
ksclnmuac
/
public_html
/
jobs
/
application
/
models
/
admin
/
Filename :
AuthenticationManagement.php
back
Copy
<?php /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * Description of AuthenticationManagement * * @author Softpro India Pvt. Ltd */ class AuthenticationManagement extends CI_Model { //put your code here function validateAdmin($credentials) { // if($credentials["username"]=="admin" && $credentials["password"]=="123admin"){ // return true; // } // else{ // return false; // } $this->db->select("*"); $this->db->from("login_mst"); $this->db->where("login_username", $credentials["username"]); $this->db->where("login_password", md5($credentials["password"])); //$this->db->where("login_status", "G"); $this->db->where("login_active_status", "T"); return $this->db->get(); } function checkIfUserExists($email) { $this->db->select("*"); $this->db->from("user_mst"); $this->db->where("um_email", $email); return $this->db->get(); } function updateAdmin($loginDetails) { $this->db->where("login_id", $loginDetails["login_id"]); return $this->db->update("login_mst", $loginDetails); } function getAdmin($admin_id, $password) { $this->db->select("*"); $this->db->from("login_mst"); $this->db->where("login_id", $admin_id); $this->db->where("login_password", $password); return $this->db->get(); } }