Public Member Functions | |
__construct ( $in_login_id=NULL, $in_hashed_password=NULL, $in_raw_password=NULL) | |
set_personal_ids ( $in_personal_ids=[]) | |
load_from_db ($in_db_result) | |
security_exemption () | |
Public Member Functions inherited from CO_Security_Login | |
__construct ( $in_db_object=NULL, $in_db_result=NULL, $in_login_id=NULL, $in_ids=NULL, $in_personal_ids=NULL) | |
set_ids ( $in_ids_array) | |
add_id ( $in_id) | |
remove_id ( $in_id) | |
ids () | |
user_can_edit_ids () | |
personal_ids () | |
get_crypted_password ( $in_password_to_crypt=NULL) | |
is_login_valid ( $in_login_id, $in_hashed_password=NULL, $in_raw_password=NULL, $in_dont_create_new_api_key=false) | |
i_am_a_god () | |
is_god () | |
is_manager () | |
get_lang () | |
set_lang ( $in_lang_id=NULL) | |
get_user_object () | |
set_password_from_cleartext ( $in_cleartext_password) | |
is_api_key_valid ( $in_api_key) | |
get_remaining_time () | |
get_api_key () | |
get_api_key_age_in_seconds () | |
clear_api_key () | |
add_personal_token_from_current_login ( $in_id) | |
remove_personal_token_from_this_login ( $in_id) | |
get_logins_that_have_any_of_my_ids () | |
user_can_write () | |
delete_from_db () | |
Public Member Functions inherited from CO_Security_Node | |
__construct ( $in_db_object=NULL, $in_db_result=NULL) | |
Public Member Functions inherited from A_CO_DB_Table_Base | |
set_batch_mode () | |
clear_batch_mode () | |
id () | |
lock () | |
locked () | |
danger_will_robinson_danger_clear_id () | |
user_can_read () | |
set_read_security_id ($in_new_id) | |
set_write_security_id ($in_new_id) | |
set_name ($in_new_value) | |
update_db () | |
reload_from_db () | |
get_access_object () | |
Protected Attributes | |
$_special_first_time_security_exemption | |
Protected Attributes inherited from CO_Security_Login | |
$_api_key | |
This is an API key for REST. More... | |
$_personal_ids | |
These are personal IDs (special IDs, unique to the login). More... | |
$_ids | |
These are security tokens, available to this ID. More... | |
Protected Attributes inherited from CO_Security_Node | |
$_ids | |
Protected Attributes inherited from A_CO_DB_Table_Base | |
$_db_object | |
This is the actual database object that "owns" this instance. It should not be exposed beyond this class or subclasses, thereof. More... | |
$_id | |
This is the within-table unique ID of this record. More... | |
$_batch_mode | |
If this is true, then the write_record call will not be made in update_db. It will be done when clear_batch_mode() is called, instead. More... | |
Additional Inherited Members | |
Public Attributes inherited from CO_Security_Login | |
$login_id | |
Public Attributes inherited from A_CO_DB_Table_Base | |
$class_description | |
This is a description of the class (not the instance). More... | |
$instance_description | |
This is a description that describes the instance. More... | |
$last_access | |
This is a UNIX epoch date that describes the last modification. The default is UNIX Day Two (in case of UTC timezone issues). More... | |
$name | |
This is the "object_name" string field. More... | |
$read_security_id | |
This is a single integer, defining the security ID required to view the record. If it is 0, then it is "open.". More... | |
$write_security_id | |
This is a single integer, defining the required security token to modify the record. If it is 0, then any logged-in user can modify. More... | |
$context | |
This is a mixed associative array, containing fields for the object. More... | |
$error | |
If there is an error, it is contained here, in a LGV_Error instance. More... | |
Protected Member Functions inherited from CO_Security_Login | |
_set_up_api_key ( $key_length) | |
_default_setup () | |
_build_parameter_array () | |
Protected Member Functions inherited from A_CO_DB_Table_Base | |
_badger_serialize ( $in_data) | |
_badger_unserialize ( $in_data) | |
_write_to_db () | |
_seppuku () | |
Static Protected Member Functions inherited from CO_Security_Login | |
static | _random_str ($length, $keyspace='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ') |
Definition at line 34 of file co_cobra_login.class.php.
CO_Cobra_Login::__construct | ( | $in_login_id = NULL , |
|
$in_hashed_password = NULL , |
|||
$in_raw_password = NULL |
|||
) |
The constructor.
$in_login_id | The login ID |
$in_hashed_password | The password, crypt-hashed |
$in_raw_password | The password, cleartext. |
Definition at line 42 of file co_cobra_login.class.php.
CO_Cobra_Login::load_from_db | ( | $in_db_result | ) |
This function sets up this instance, according to the DB-formatted associative array passed in.
Reimplemented from CO_Security_Login.
Reimplemented in CO_Login_Manager.
Definition at line 103 of file co_cobra_login.class.php.
CO_Cobra_Login::security_exemption | ( | ) |
This weird little function allows a creator to once -and only once- add an ID to itself, as long as that ID is for this object. This is a "Heisenberg" query. Once it's called, the security exemption is gone.
returns true, if the security exemption was on.
Definition at line 127 of file co_cobra_login.class.php.
CO_Cobra_Login::set_personal_ids | ( | $in_personal_ids = [] | ) |
This sets just the "personal" IDs for object. Unlike the one in the initial login class, this can be called by non-God admins.
This only sets the IDs, if the member property is NULL (just created).
This is not an atomic operation. If any of the given IDs are also in the regular ID list, they will be removed from the personal IDs.
$in_personal_ids | An Array of Integers, with the new personal IDs. This replaces any previous ones. If empty, then the IDs are removed. |
Reimplemented from CO_Security_Login.
Definition at line 68 of file co_cobra_login.class.php.
|
protected |
Definition at line 35 of file co_cobra_login.class.php.