From c274c1c70d0d4c6feed72fce1bdd68c4a917036f Mon Sep 17 00:00:00 2001 From: "venbatechnologies@gmail.com" Date: Wed, 25 Apr 2018 10:36:11 +0530 Subject: [PATCH] reset password --- api/application/models/Forgot_model.php | 10 ++++++++-- api/application/models/Login_model.php | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/api/application/models/Forgot_model.php b/api/application/models/Forgot_model.php index 06fc3a4..f1e529a 100755 --- a/api/application/models/Forgot_model.php +++ b/api/application/models/Forgot_model.php @@ -12,6 +12,8 @@ class Forgot_model extends CI_Model { // function forget($user=null, $password) { + + //echo $password; $this->db->select('ID,Emailid,MobileNumber,Password'); $this->db->from(LOGIN); $this->db->where('MobileNumber', $user['MobileNumber']); @@ -19,6 +21,10 @@ class Forgot_model extends CI_Model { $forgotDetails1 = $this->db->get()->first_row(); // echo $forgotDetails->MobileNumber;exit(); $mobile=$forgotDetails1->MobileNumber; + + $user['MobileNumber'] = $mobile; + // print_r($user); + // die(); // $result = $query->result_array(); if($forgotDetails1){ @@ -31,8 +37,8 @@ class Forgot_model extends CI_Model { $existUserID=$forgotDetails->ID; $this->db->where('ID', $existUserID); $upatePassword=$this->db->update('T_Login', $user); - // print_r ($upatePassword) ; - //exit(); + // print_r($user) ; + //exit(); if($upatePassword) { $this->smssend($mobile, $password); $result['forgotstatus'] = true; diff --git a/api/application/models/Login_model.php b/api/application/models/Login_model.php index 6d6c91f..4eaabf3 100755 --- a/api/application/models/Login_model.php +++ b/api/application/models/Login_model.php @@ -43,7 +43,7 @@ class Login_model extends CI_Model if ($password == $loginDetails->Password) { if($loginDetails->ListCode == SUPER_ADMIN){ - // echo "Super"; + echo "Super"; // print_r($loginDetails);exit(); $this->db->select('t1.MobileNumber, t1.ListCode, t1.ID, t2.BranchCode, t2.FinanceModuleAccess'); $this->db->from('' . LOGIN . ' as t1'); @@ -72,7 +72,7 @@ class Login_model extends CI_Model } } 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->from('' . LOGIN . ' as t1'); $this->db->join('' . STAFF . ' as t2', 't1.StaffID = t2.StaffID', 'LEFT');