raj
This commit is contained in:
commit
03f8215dc5
@ -133,11 +133,14 @@ class Login_model extends CI_Model
|
||||
{
|
||||
// print_r($loginDetails->ListCode);
|
||||
|
||||
|
||||
|
||||
if($loginDetails->ListCode != SUPER_ADMIN)
|
||||
{
|
||||
{
|
||||
//echo 'NO_SUPER_ADMIN';die();
|
||||
if ($mobile == $loginDetails->MobileNumber || strtoupper($mobile) == strtoupper($loginDetails->StaffID))
|
||||
{
|
||||
|
||||
// echo 'no _if';die();
|
||||
// print_r($loginDetails);die();
|
||||
|
||||
$this->db->select('LO.MobileNumber, LO.ListCode, LO.ID, ST.IsActive,LO.StaffID');
|
||||
@ -146,11 +149,14 @@ class Login_model extends CI_Model
|
||||
$this->db->join('' . STAFF_BRANCH . ' as SC', 'SC.StaffID = ST.StaffID');
|
||||
$this->db->join('' . BRANCH . ' as BR', 'BR.BranchCode = SC.BranchCode');
|
||||
$this->db->where('LO.MobileNumber', $mobile);
|
||||
$this->db->where('LO.OTP',$password);
|
||||
$this->db->where('ST.IsActive', 1);
|
||||
// $this->db->where('BR.Is_StudentWebAccessActive', 1);
|
||||
$responseDetails = $this->db->get()->first_row();
|
||||
|
||||
//print_r($responseDetails);die();
|
||||
|
||||
// print_r($this->db->last_query());die();
|
||||
|
||||
|
||||
if($responseDetails)
|
||||
@ -158,8 +164,11 @@ class Login_model extends CI_Model
|
||||
|
||||
$save['OTP'] = '';
|
||||
$this->db->where('MobileNumber',$mobile);
|
||||
$this->db->where('ListCode',STUDENT);
|
||||
$this->db->update('T_Login',$save);
|
||||
$this->db->where('StaffID',$mobile);
|
||||
// $this->db->where('ListCode',ADMIN);
|
||||
// $this->db->or_where('ListCode',EMPLOYEE);
|
||||
// $this->db->or_where('ListCode',TRAINEE);
|
||||
$this->db->update('T_Login',$save);//print_r($this->db->last_query());die();
|
||||
if($responseDetails->IsActive == 1)
|
||||
{
|
||||
$result['loginStatus'] = true;
|
||||
@ -182,7 +191,7 @@ class Login_model extends CI_Model
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
{ // echo 'no _else';die();
|
||||
$result['loginStatus'] = false;
|
||||
$result['message'] = "Please Enter Register Mobile Number !!";
|
||||
}
|
||||
@ -193,7 +202,7 @@ class Login_model extends CI_Model
|
||||
else if($loginDetails->ListCode ==SUPER_ADMIN)
|
||||
{
|
||||
|
||||
// echo 'in';die();
|
||||
// echo 'SUPER_ADMIN';die();
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user