backend user
This commit is contained in:
@@ -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)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user