reset password
This commit is contained in:
parent
713268de56
commit
c274c1c70d
@ -12,6 +12,8 @@ class Forgot_model extends CI_Model {
|
|||||||
//
|
//
|
||||||
function forget($user=null, $password)
|
function forget($user=null, $password)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
//echo $password;
|
||||||
$this->db->select('ID,Emailid,MobileNumber,Password');
|
$this->db->select('ID,Emailid,MobileNumber,Password');
|
||||||
$this->db->from(LOGIN);
|
$this->db->from(LOGIN);
|
||||||
$this->db->where('MobileNumber', $user['MobileNumber']);
|
$this->db->where('MobileNumber', $user['MobileNumber']);
|
||||||
@ -19,6 +21,10 @@ class Forgot_model extends CI_Model {
|
|||||||
$forgotDetails1 = $this->db->get()->first_row();
|
$forgotDetails1 = $this->db->get()->first_row();
|
||||||
// echo $forgotDetails->MobileNumber;exit();
|
// echo $forgotDetails->MobileNumber;exit();
|
||||||
$mobile=$forgotDetails1->MobileNumber;
|
$mobile=$forgotDetails1->MobileNumber;
|
||||||
|
|
||||||
|
$user['MobileNumber'] = $mobile;
|
||||||
|
// print_r($user);
|
||||||
|
// die();
|
||||||
|
|
||||||
// $result = $query->result_array();
|
// $result = $query->result_array();
|
||||||
if($forgotDetails1){
|
if($forgotDetails1){
|
||||||
@ -31,8 +37,8 @@ class Forgot_model extends CI_Model {
|
|||||||
$existUserID=$forgotDetails->ID;
|
$existUserID=$forgotDetails->ID;
|
||||||
$this->db->where('ID', $existUserID);
|
$this->db->where('ID', $existUserID);
|
||||||
$upatePassword=$this->db->update('T_Login', $user);
|
$upatePassword=$this->db->update('T_Login', $user);
|
||||||
// print_r ($upatePassword) ;
|
// print_r($user) ;
|
||||||
//exit();
|
//exit();
|
||||||
if($upatePassword) {
|
if($upatePassword) {
|
||||||
$this->smssend($mobile, $password);
|
$this->smssend($mobile, $password);
|
||||||
$result['forgotstatus'] = true;
|
$result['forgotstatus'] = true;
|
||||||
|
|||||||
@ -43,7 +43,7 @@ class Login_model extends CI_Model
|
|||||||
if ($password == $loginDetails->Password) {
|
if ($password == $loginDetails->Password) {
|
||||||
|
|
||||||
if($loginDetails->ListCode == SUPER_ADMIN){
|
if($loginDetails->ListCode == SUPER_ADMIN){
|
||||||
// echo "Super";
|
echo "Super";
|
||||||
// print_r($loginDetails);exit();
|
// print_r($loginDetails);exit();
|
||||||
$this->db->select('t1.MobileNumber, t1.ListCode, t1.ID, t2.BranchCode, t2.FinanceModuleAccess');
|
$this->db->select('t1.MobileNumber, t1.ListCode, t1.ID, t2.BranchCode, t2.FinanceModuleAccess');
|
||||||
$this->db->from('' . LOGIN . ' as t1');
|
$this->db->from('' . LOGIN . ' as t1');
|
||||||
@ -72,7 +72,7 @@ class Login_model extends CI_Model
|
|||||||
}
|
}
|
||||||
} else if ($loginDetails->ListCode == ADMIN || $loginDetails->ListCode == EMPLOYEE) {
|
} else if ($loginDetails->ListCode == ADMIN || $loginDetails->ListCode == EMPLOYEE) {
|
||||||
|
|
||||||
//print_r($loginDetails);exit();
|
//print_r($loginDetails);exit();
|
||||||
$this->db->select('t1.MobileNumber, t3.ListCode, t1.ID, t3.BranchCode, t3.FinanceModuleAccess');
|
$this->db->select('t1.MobileNumber, t3.ListCode, t1.ID, t3.BranchCode, t3.FinanceModuleAccess');
|
||||||
$this->db->from('' . LOGIN . ' as t1');
|
$this->db->from('' . LOGIN . ' as t1');
|
||||||
$this->db->join('' . STAFF . ' as t2', 't1.StaffID = t2.StaffID', 'LEFT');
|
$this->db->join('' . STAFF . ' as t2', 't1.StaffID = t2.StaffID', 'LEFT');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user