fix
This commit is contained in:
@@ -26,20 +26,20 @@ class Auth extends Start_Controller {
|
||||
$data["page_title"] = "";
|
||||
$data["username"] = $username; //"auxsupport";
|
||||
$data["password"] = $password;
|
||||
$data["sessionid"] ="12345678901234567890";
|
||||
$data["sessionid"] = "12345678901234567890";
|
||||
$out = [];
|
||||
$this->coregrade_webapi(COREGRADE_ACCOUNT_LOGIN, $data, $out);
|
||||
//print_r( $data );
|
||||
//print_r( $out );
|
||||
if (count($out) > 0 && isset($out["sessionid"]) && isset($out["member_id"]) && $out["member_id"] > 0 ) {
|
||||
// print_r($out);
|
||||
if (count($out) > 0 && isset($out["sessionid"]) && isset($out["member_id"]) && $out["member_id"] > 0) {
|
||||
// print_r($out);
|
||||
//$this->getSessionData($out[0], $session_data); // just for testing
|
||||
|
||||
$this->buildUserSession(PHP_API_OK, $out);
|
||||
$valid_login = true;
|
||||
$this->session->set_flashdata('in', $out);
|
||||
redirect("member/index");
|
||||
$login_done = true;
|
||||
redirect("member/index");
|
||||
$login_done = true;
|
||||
} else {
|
||||
$error_message = "Invalid Username/Password";
|
||||
}
|
||||
@@ -48,12 +48,11 @@ class Auth extends Start_Controller {
|
||||
|
||||
|
||||
|
||||
// $this->renderMemberPages('view_dash', $data);
|
||||
// $login_done = true;
|
||||
|
||||
// $this->renderMemberPages('view_dash', $data);
|
||||
// $login_done = true;
|
||||
// exit();
|
||||
}
|
||||
// echo 'hhhh jjjj';
|
||||
// echo 'hhhh jjjj';
|
||||
//$this->coregrade_webapi(100, $data, $out);
|
||||
// print_r($out);
|
||||
|
||||
@@ -105,17 +104,28 @@ class Auth extends Start_Controller {
|
||||
}
|
||||
|
||||
public function resetpass() {
|
||||
//$this->load->view('home/home');
|
||||
//echo "START RESET 1";
|
||||
$data = array();
|
||||
$out = array();
|
||||
$data["next_page"] = 0;
|
||||
$data["error_message"] = "";
|
||||
if ($_POST) {
|
||||
$data['username'] = trim($this->input->post('username'));
|
||||
$data["mode"] = RESET_START;
|
||||
if ($data['username'] != '') {
|
||||
$this->coregrade_webapi(COREGRADE_START_RESET_PASSWORD, $data, $out);
|
||||
$data["next_page"] = 100;
|
||||
} else {
|
||||
$data["error_message"] = "Please enter a valis username to continue";
|
||||
}
|
||||
}
|
||||
|
||||
$this->load->view('auth/view_head');
|
||||
$this->load->view('auth/view_reset_password');
|
||||
$this->load->view('auth/view_reset_password', $data);
|
||||
$this->load->view('auth/view_foot');
|
||||
}
|
||||
|
||||
public function logout() {
|
||||
$this->index();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user