Fixed log in
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
apache_log
|
||||
TEST
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user