fix
This commit is contained in:
@@ -4,6 +4,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Auth extends Start_Controller {
|
||||
|
||||
|
||||
|
||||
|
||||
public function index() {
|
||||
$login_done = false;
|
||||
$data = array();
|
||||
@@ -26,18 +29,20 @@ class Auth extends Start_Controller {
|
||||
$data["page_title"] = "";
|
||||
$data["username"] = $username; //"auxsupport";
|
||||
$data["password"] = $password;
|
||||
$data["sessionid"] ="12345678901234567890";
|
||||
$out = [];
|
||||
$this->coregrade_webapi(COREGRADE_ACCOUNT_LOGIN, $data, $out);
|
||||
//print_r( $data );
|
||||
//print_r( $out );
|
||||
if (count($out) > 0 && isset($out["session"])) {
|
||||
//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("page/index");
|
||||
redirect("member/index");
|
||||
$login_done = true;
|
||||
} else {
|
||||
$error_message = "Invalid Username/Password";
|
||||
}
|
||||
@@ -46,15 +51,14 @@ 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';
|
||||
$this->coregrade_webapi(100, $data, $out);
|
||||
|
||||
print_r($out);
|
||||
// echo 'hhhh jjjj';
|
||||
//$this->coregrade_webapi(100, $data, $out);
|
||||
// print_r($out);
|
||||
|
||||
if (false == $login_done) {
|
||||
$this->renderAuthPages('view_login', $data);
|
||||
@@ -81,7 +85,7 @@ class Auth extends Start_Controller {
|
||||
$this->coregrade_webapi(COREGRADE_ACCOUNT_PENDING, $data, $out);
|
||||
|
||||
//print_r( $data );
|
||||
// print_r($out);
|
||||
// print_r($out);
|
||||
if (count($out) > 0 && isset($out["pending_id"]) && $out["pending_id"] > 0) {
|
||||
//print_r($out);
|
||||
//$this->getSessionData($out[0], $session_data); // just for testing
|
||||
|
||||
Reference in New Issue
Block a user