request->getPostGet(); $raw_json = file_get_contents('php://input'); $in = json_decode($raw_json, true); $in["action"] = WRENCHBOARD_ACCOUNT_LOGIN; if (!isset($in["login_mode"])){ $in["login_mode"] = MOBILE_LOGIN; } $out=[]; // $out = $this->getCache($endpoint); // try find in cache $ret = $this->wrenchboard->wrenchboard_api($in, $out); $out['internal_return'] = $ret; if ( $out['internal_return'] == 100 ){ $endpoint = "USER_SESSION-"; $this->saveCache($endpoint,$out,15000); }else { $outF["username"] = $in["username"]; $outF["loc"] = $in["loc"]; $endpoint = "LOGIN_FAILED-".$outF["username"]."-"; $this->saveCache($endpoint,$outF,15000); } // } return $this->respond( $this->summaryReturnData($in,$out), 200); // return $this->summaryReturnData($in,$out); //json_encode( $final_out ); } } // WrenchAuth::userLogin