login changes

This commit is contained in:
venbatechnologies@gmail.com 2018-01-09 10:46:07 +05:30
parent ae459d8ef5
commit d9ab6b471f
3 changed files with 3 additions and 2 deletions

View File

@ -52,7 +52,7 @@ class Login extends CI_Controller
{ {
$this->load->library('form_validation'); $this->load->library('form_validation');
$this->form_validation->set_rules('email', 'Email', 'required|valid_email|max_length[128]|xss_clean|trim'); // $this->form_validation->set_rules('email', 'Email', 'required|valid_email|max_length[128]|xss_clean|trim');
$this->form_validation->set_rules('password', 'Password', 'required|max_length[32]|'); $this->form_validation->set_rules('password', 'Password', 'required|max_length[32]|');
$designation=''; $designation='';
$role=''; $role='';

View File

@ -16,6 +16,7 @@ class Login_model extends CI_Model
$this->db->join('T_Employee_Details as Emp','BaseTbl.EmpID = Emp.EmpID'); $this->db->join('T_Employee_Details as Emp','BaseTbl.EmpID = Emp.EmpID');
$this->db->join('T_DepartmentDetails as DEPT','Emp.Departmentcode = DEPT.DEPCode'); $this->db->join('T_DepartmentDetails as DEPT','Emp.Departmentcode = DEPT.DEPCode');
$this->db->where('BaseTbl.email', $email); $this->db->where('BaseTbl.email', $email);
$this->db->or_where('Emp.ContactNumber', $email);
$this->db->where('BaseTbl.isDeleted', 0); $this->db->where('BaseTbl.isDeleted', 0);
$query = $this->db->get(); $query = $this->db->get();

View File

@ -42,7 +42,7 @@
<form action="<?php echo base_url(); ?>loginMe" method="post"> <form action="<?php echo base_url(); ?>loginMe" method="post">
<div class="form-group has-feedback"> <div class="form-group has-feedback">
<input type="email" class="form-control" placeholder="Email" name="email" required /> <input type="text" class="form-control" placeholder="Email" name="email" required />
<span class="glyphicon glyphicon-envelope form-control-feedback"></span> <span class="glyphicon glyphicon-envelope form-control-feedback"></span>
</div> </div>
<div class="form-group has-feedback"> <div class="form-group has-feedback">