You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

52 lines
938 B
PHTML

5 years ago
<?php
class User
{
protected $is_connected = false;
5 years ago
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;
5 years ago
protected $groups =array();
protected $db;
5 years ago
5 years ago
public function get_id()
{
if($this->is_connected){
return $this->id;
}
return false;
}
public function is_connected()
{
return $this->is_connected;
}
5 years ago
5 years ago
public function get_auth_method()
{
if($this->is_connected){
return $this->auth_method;
}
return false;
}
public function get_groups()
{
return $this->groups;
}
5 years ago
5 years ago
public function set_db(PDO $db){
$this->$db = $db;
}
public function __construct(PDO $db){
5 years ago
$this->db = $db;
}
}