diff --git a/User.php b/User.php index cfdecbb..d36cbb1 100644 --- a/User.php +++ b/User.php @@ -3,15 +3,14 @@ class User { protected $is_connected = false; - protected $id, $display_name, $auth_method; + protected $external_id; //the user's ID on the external auth system (Object SID on LDAP) + protected $id; //the internal id to store locally user's datas + protected $display_name; + protected $auth_method; protected $groups =array(); protected $db; - public function __sleep(){ - return array('is_connected','id','display_name','auth_method','groups'); - } - public function get_id() { if($this->is_connected){ @@ -23,6 +22,7 @@ class User { return $this->is_connected; } + public function get_auth_method() { if($this->is_connected){ @@ -34,10 +34,7 @@ class User { return $this->groups; } - public function set_db_obj($db){ - $this->db = $db; - return $this; - } + public function __construct($db){ $this->db = $db; } diff --git a/User_CAS.php b/User_CAS.php new file mode 100644 index 0000000..3474188 --- /dev/null +++ b/User_CAS.php @@ -0,0 +1,6 @@ +authentificate($login,$password)){