diff --git a/application/controllers/users.php b/application/controllers/users.php index c92cc0a..aafa914 100644 --- a/application/controllers/users.php +++ b/application/controllers/users.php @@ -308,7 +308,8 @@ public function verify() { ); $this->db->where('id', $exist['id']); $this->db->update('users', $data); - $this->session->set_flashdata('validate', array('message' => 'Your account successfully verified', 'type' => 'success')); + $this->session->set_flashdata('validate', + array('message' => 'Your account successfully verified', 'type' => 'success')); //Send email to admin about new user signup $this->load->library('email'); @@ -328,13 +329,18 @@ public function verify() { $sess_array = array(); if ($exist['is_deleted'] == 1) { - $this->session->set_flashdata('validate', array('message' => 'Your account has been deleted by admin.', 'type' => 'warning')); + $this->session->set_flashdata('validate', + array('message' => 'Your account has been deleted by admin.', + 'type' => 'warning')); redirect(base_url()); } else { - $this->session->set_flashdata('validate', array('message' => 'Your account successfully verified and logged in.', 'type' => 'success')); + $this->session->set_flashdata('validate', + array('message' => 'Your account successfully verified and logged in.', + 'type' => 'success')); } - $query_department = $this->db->get_where('department', array('id' => $exist['department_id'])); + $query_department = $this->db->get_where('department', + array('id' => $exist['department_id'])); $department_rec = $query_department->row_array(); $sess_array = array( @@ -359,7 +365,8 @@ public function verify() { } else { - $this->session->set_flashdata('validate', array('message' => 'Your email already verified', 'type' => 'warning')); + $this->session->set_flashdata('validate', + array('message' => 'Your email already verified', 'type' => 'warning')); } redirect(base_url() . 'guest'); } @@ -372,7 +379,8 @@ public function autologin($slug) { $this->session->unset_userdata('view_session'); //session_destroy(); - $query = $this->db->get_where('users', array('id' => $slug, 'is_deleted' => '0')); + $query = $this->db->get_where('users', + array('id' => $slug, 'is_deleted' => '0')); $exist = $query->row_array(); $logary=array('action'=>'logout','description'=>'logout and auto login'); addlog($logary); @@ -380,7 +388,8 @@ public function autologin($slug) { if ($exist) { $sess_array = array(); - $query_department = $this->db->get_where('department', array('id' => $exist['department_id'])); + $query_department = $this->db->get_where('department', + array('id' => $exist['department_id'])); $department_rec = $query_department->row_array(); $sess_array = array( @@ -407,7 +416,8 @@ public function autologin($slug) { function department_name_exists($key) { if ($this->department_model->department_already_exist($key)) { - $this->form_validation->set_message('department_name_exists', 'The %s already exists'); + $this->form_validation->set_message('department_name_exists', + 'The %s already exists'); return false; } else { return true; @@ -416,7 +426,8 @@ function department_name_exists($key) { function username_not_available($key) { if ($this->users_model->username_already_exist($key)) { - $this->form_validation->set_message('username_not_available', '%s not available'); + $this->form_validation->set_message('username_not_available', + '%s not available'); return false; } else { return true;