From f0c36e7b574e762b72f96f0d933ae27c2e6ee1fc Mon Sep 17 00:00:00 2001 From: Gnieark Date: Thu, 4 Apr 2019 15:58:20 +0200 Subject: [PATCH] sql --- User.php | 15 ++++++--------- User_CAS.php | 6 ++++++ User_Manager.php | 39 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 9 deletions(-) create mode 100644 User_CAS.php 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)){