public function __construct($modx, $debug = false) { parent::__construct($modx, $debug); $this->get_TV(); $uTable = $this->makeTable("manager_users"); $aTable = $this->makeTable("user_attributes"); $query = "SELECT `u`.`id`, `a`.`email`, `u`.`username` FROM " . $aTable . " as `a` LEFT JOIN " . $uTable . " as `u` ON `u`.`id`=`a`.`internalKey`"; $this->managerUsers = new DLCollection($modx, $this->query($query)); }
public function __construct($modx, $debug = false) { parent::__construct($modx, $debug); if (empty($this->default_field)) { $data = $this->modx->db->getTableMetaData($this->makeTable($this->table)); foreach ($data as $item) { if (empty($this->pkName) && $item['Key'] == 'PRI') { $this->pkName = $item['Field']; } if ($this->pkName != $item['Field']) { $this->default_field[$item['Field']] = $item['Default']; } } $this->generateField = true; } }
public function __construct($modx) { parent::__construct($modx); $this->get_TV(); }