Fixed log in

This commit is contained in:
Olu Amey
2021-10-11 19:22:14 -04:00
parent cd40ff4dde
commit 38c0937884
3 changed files with 10 additions and 13 deletions
+2
View File
@@ -0,0 +1,2 @@
apache_log
TEST
+4
View File
@@ -31,6 +31,10 @@ class Login extends WRB_Controller {
// $res = $this->backend_model->wrenchboard_api($data, $out);
$res = $this->wrenchboard_api($data, $out);
$is_live = $this->backend_model->cfgReadChar("system.live");
// var_dump($out);
// exit;
// print_r($out);
if ($res == PHP_LOGIN_OK) {
$this->load->model('account_model');
+4 -13
View File
@@ -17,7 +17,7 @@ class Backend_model extends CI_Model {
$this->thisUser = $this->USER;
}
public function wrenchboard_api($in, $out = array()) {
public function wrenchboard_api($in, &$out = array()) {
$ret = 0;
$local_url = 'http://fluxtra:fl0xtra!@oameye.works.wrenchboard.com/svs/user';
@@ -25,16 +25,6 @@ class Backend_model extends CI_Model {
$url = $local_url ."/generics";
$data = $in;
$username = "ses66181+1@gmail.com";
$data = array(
"username" => $username,
"password" => "may12002",
"sessionid" => "DUMMYSESSION"
);
$content = json_encode($data);
$curl = curl_init($url);
@@ -58,8 +48,9 @@ class Backend_model extends CI_Model {
$out = $response;
return $ret;
//var_dump( $response["internal_return"] );
// exit;
return $response["internal_return"];
}
public function cfgReadChar($str) {