backend user

This commit is contained in:
DESKTOP-GBA0BK8\Admin
2023-04-16 08:43:24 -04:00
parent 44d491603f
commit ec29bf309c
+12 -13
View File
@@ -5,22 +5,21 @@ use CodeIgniter\Model;
class BackendModel extends Model class BackendModel extends Model
{ {
var $thisUser = 'oameye';
var $USER = '';
var $wrenchboard;
const DEBUG_API_CALLS = true; const DEBUG_API_CALLS = true;
public $wrenchboard;
function __construct() { public $USER = 'root';
public function __construct()
$this->USER = $_SERVER['SCRIPT_FILENAME']; {
$this->USER = str_replace('/home', '', $this->USER); $USER = $_SERVER['SCRIPT_FILENAME'];
$this->USER = strtok($this->USER, '/'); $USER = str_replace('/home', '', $USER);
if ($this->USER == 'opt') { $USER = strtok($USER, '/');
$this->USER = 'root'; if ($USER=='opt') $USER = 'root';
} // Load API class
$this->thisUser = $this->USER; $USER = 'root';
$this->USER = $USER;
} }
public function wrenchboard_api($in, $out = array()) { public function wrenchboard_api($in, $out = array()) {
$this->wrenchboard_load(); $this->wrenchboard_load();
if (!is_array($in)) { if (!is_array($in)) {