D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
ksclnmuac
/
public_html
/
alumni
/
application
/
models
/
Filename :
AuthenticationManager.php
back
Copy
<?php /** * Description of User * * @author Softpro India Pvt. Ltd. */ class AuthenticationManager extends CI_Model { //put your code here public function __construct() { parent::__construct(); } function saveSignUpData($signupArray) { $this->db->insert("tbl_stu_alu", $signupArray); $userID = $this->db->insert_id(); if ($userID > 0) { $this->db->insert("tbl_profile", array("user_id" => $userID)); $this->db->insert("tbl_login_logout_details", array("userid" => $userID)); return $userID; } return 0; } function authenticateUser($email, $password) { $this->db->select("*"); $this->db->from("tbl_stu_alu sa"); $this->db->join("tbl_login_logout_details lld","sa.userid=lld.userid"); $this->db->where("sa.email", $email); $this->db->where("sa.password", $password); return $this->db->get(); } function checkUserExistance($email) { $this->db->select("*"); $this->db->from("tbl_stu_alu"); $this->db->where("email", $email); return $this->db->get(); } function updateAccessLog($userid,$accessLogData){ $this->db->where("userid",$userid); return $this->db->update("tbl_login_logout_details",$accessLogData); } }