mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 09:52:22 +00:00
Messages
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
|
||||
class DB_Model extends FHC_Model
|
||||
{
|
||||
protected $dbTable; // Name of the DB-Table for CI-Insert, -Update, ...
|
||||
protected $pk; // Name of the PrimaryKey for DB-Update, Load, ...
|
||||
protected $dbTable; // Name of the DB-Table for CI-Insert, -Update, ...
|
||||
protected $pk; // Name of the PrimaryKey for DB-Update, Load, ...
|
||||
protected $hasSequence; // False if this table has a composite primary key that is not using a sequence
|
||||
// True if this table has a primary key that uses a sequence
|
||||
protected $acl; // Name of the PrimaryKey for DB-Update, Load, ...
|
||||
protected $acl; // Name of the PrimaryKey for DB-Update, Load, ...
|
||||
|
||||
function __construct($dbTable = null, $pk = null, $hasSequence = true)
|
||||
{
|
||||
|
||||
@@ -3,19 +3,22 @@ if (! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
class FHC_Controller extends CI_Controller
|
||||
{
|
||||
public $uid;
|
||||
protected $_uid; // needs to be changed to protected $_uid
|
||||
|
||||
function __construct()
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
$this->load->library('session');
|
||||
//$this->load->helper('language');
|
||||
$this->load->helper('fhcauth');
|
||||
|
||||
// look if User is logged in and set uid
|
||||
if (isset($_SERVER['PHP_AUTH_USER']))
|
||||
$this->uid = $_SERVER['PHP_AUTH_USER'];
|
||||
if (isset($_SESSION['uid']))
|
||||
$this->uid = $_SESSION['uid'];
|
||||
$this->session->set_userdata('uid', 'pam');
|
||||
$this->_uid = getAuthUID();
|
||||
}
|
||||
|
||||
public function getUID()
|
||||
{
|
||||
if (empty($this->_uid))
|
||||
return false;
|
||||
else
|
||||
return $this->_uid;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,16 @@ class FHC_Model extends CI_Model
|
||||
{
|
||||
return $this->fhc_db_acl->setUID($uid);
|
||||
}
|
||||
|
||||
/** ---------------------------------------------------------------
|
||||
* get UID
|
||||
*
|
||||
* @return string or (bool)false
|
||||
*/
|
||||
public function getUID()
|
||||
{
|
||||
return $this->fhc_db_acl->getUID();
|
||||
}
|
||||
|
||||
/** ---------------------------------------------------------------
|
||||
* Success
|
||||
@@ -61,4 +71,4 @@ class FHC_Model extends CI_Model
|
||||
{
|
||||
return error($retval, $message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user