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