26 defined(
'LGV_ACCESS_CATCHER' ) or die ( 'Cannot Execute Directly' );
28 require_once(CO_Config::db_classes_class_dir().'/co_security_login.class.php');
29 require_once(dirname(__FILE__).'/co_login_manager.class.php');
43 $in_hashed_password = NULL,
44 $in_raw_password = NULL
46 parent::__construct($in_login_id, $in_hashed_password, $in_raw_password);
48 $this->_special_first_time_security_exemption =
true;
49 if (intval($this->
id()) == intval(CO_Config::god_mode_id())) {
51 $this->context[
'hashed_password'] = bin2hex(openssl_random_pseudo_bytes(4));
52 $this->instance_description =
'GOD MODE: '.(isset($this->name) && $this->name ?
"$this->name (".$this->login_id.
")" :
"Unnamed Standard Login Node (".$this->login_id.
")");
54 $this->instance_description = isset($this->name) && $this->name ?
"$this->name (".$this->login_id.
")" :
"Unnamed Standard Login Node (".$this->login_id.
")";
70 $personal_ids_temp = array_unique(array_map(
'intval', $in_personal_ids));
71 if (CO_Config::use_personal_tokens() && (NULL == $this->_personal_ids) && is_array($personal_ids_temp) && count($personal_ids_temp)) {
73 $my_ids = $this->_ids;
76 foreach($personal_ids_temp as $id) {
78 if (($key = array_search($id, $my_ids)) !==
false) {
81 if (!$this->get_access_object()->is_this_a_login_id($id) && (!$this->get_access_object()->is_this_a_personal_id($id) || in_array($id, $this->_personal_ids))) {
82 array_push($personal_ids, $id);
85 $this->_ids = $my_ids;
87 $this->_personal_ids = $personal_ids;
91 parent::set_personal_ids($in_personal_ids);
94 return $this->_personal_ids;
104 $ret = parent::load_from_db($in_db_result);
107 $this->class_description =
'This is a security class for standard logins.';
108 if (intval($this->
id()) == intval(CO_Config::god_mode_id())) {
110 $this->context[
'hashed_password'] = bin2hex(openssl_random_pseudo_bytes(4));
111 $this->instance_description =
'GOD MODE: '.(isset($this->name) && $this->name ?
"$this->name (".$this->login_id.
")" :
"Unnamed Standard Login Node (".$this->login_id.
")");
113 $this->instance_description = isset($this->name) && $this->name ?
"$this->name (".$this->login_id.
")" :
"Unnamed Standard Login Node (".$this->login_id.
")";
128 $ret = $this->_special_first_time_security_exemption;
129 $this->_special_first_time_security_exemption =
false;
$_special_first_time_security_exemption
set_personal_ids( $in_personal_ids=[])
__construct( $in_login_id=NULL, $in_hashed_password=NULL, $in_raw_password=NULL)
load_from_db($in_db_result)