public function index() { $currUser = currentuser_session(); if ($currUser['loggedIn']) { redirect(base_url('welcome')); } $success = $this->session->flashdata('success'); $error = $this->session->flashdata('error'); $viewData['success'] = $success; $viewData['error'] = $error; view_load_view('login-view', $viewData); }
public function index() { if ($_REQUEST) { $userId = $this->input->get_post('id'); $viewData['userId'] = $userId; $basicModel = load_basic_model('users'); $userData = $basicModel->get(array('user_id' => $userId), 1); $token = $userData['token']; if ($token == NULL) { $this->session->set_flashdata('error', 'This link has been used.'); redirect(base_url()); } } else { $this->session->set_flashdata('error', 'Follow the link in email to change password.'); redirect(base_url()); } view_load_view('change_password_via_email', $viewData); }