Public Member Functions | |
__construct ( $in_db_object=NULL, $in_db_result=NULL, $in_owner_id=NULL, $in_tags_array=NULL) | |
load_from_db ( $in_db_result) | |
get_login_instance () | |
has_login () | |
has_login_i_cant_see () | |
is_god () | |
is_manager () | |
set_tags ( $in_tags_array) | |
set_tag ( $in_tag_index, $in_tag_value) | |
get_surname () | |
set_surname ( $in_surname) | |
get_middle_name () | |
set_middle_name ( $in_middle_name) | |
get_given_name () | |
set_given_name ( $in_given_name) | |
get_prefix () | |
set_prefix ( $in_prefix) | |
get_suffix () | |
set_suffix ( $in_suffix) | |
get_nickname () | |
set_nickname ( $in_nickname) | |
set_login ( $in_login_id_integer) | |
get_lang () | |
delete_from_db ( $with_extreme_prejudice=false, $delete_login_object_too=false) | |
Public Member Functions inherited from CO_LL_Location | |
__construct ( $in_db_object=NULL, $in_db_result=NULL, $in_owner_id=NULL, $in_tags_array=NULL, $in_longitude=NULL, $in_latitude=NULL, $in_fuzz_factor=NULL, $in_can_see_through_the_fuzz=NULL) | |
update_db () | |
set_longitude ( $in_new_value) | |
set_latitude ( $in_new_value) | |
fuzz_factor () | |
is_fuzzy () | |
set_fuzz_factor ( $in_new_value) | |
raw_longitude () | |
raw_latitude () | |
longitude () | |
latitude () | |
set_can_see_through_the_fuzz ( $in_id) | |
can_see_through_the_fuzz () | |
i_can_see_clearly_now () | |
Public Member Functions inherited from CO_Main_DB_Record | |
set_owner_id ( $in_new_id) | |
get_payload () | |
set_payload ( $in_payload) | |
owner_id () | |
tags () | |
Public Member Functions inherited from A_CO_DB_Table_Base | |
__construct ( $in_db_object=NULL, $in_db_result=NULL) | |
set_batch_mode () | |
clear_batch_mode () | |
id () | |
lock () | |
locked () | |
danger_will_robinson_danger_clear_id () | |
user_can_read () | |
user_can_write () | |
set_read_security_id ($in_new_id) | |
set_write_security_id ($in_new_id) | |
set_name ($in_new_value) | |
delete_from_db () | |
reload_from_db () | |
get_access_object () | |
set_lang ( $in_lang_id=NULL) | |
Public Member Functions inherited from tCO_Collection | |
reload_collection () | |
insertElement ( $in_element, $in_before_index=-1, $dont_update=false) | |
insertElements ( $in_element_array, $in_before_index=-1) | |
deleteElements ( $in_first_index, $in_deletion_length) | |
deleteElement ( $in_index) | |
deleteThisElement ( $in_element) | |
appendElement ( $in_element) | |
appendElements ( $in_element_array) | |
deleteAllChildren () | |
indexOfThisElement ( $in_element) | |
whosYourDaddy ( $in_element) | |
areYouMyDaddy ( $in_element, $full_hierachy=true) | |
map ( $in_function) | |
recursiveMap ( $in_function, $in_hierarchy_level=0, $in_parent_object=NULL, $loop_stopper=Array()) | |
count ( $is_recursive=false) | |
children () | |
children_ids ( $in_raw=false) | |
set_children_ids ( $in_new_ids) | |
who_are_my_parents () | |
getHierarchy ( $loop_stopper=Array()) | |
Protected Member Functions | |
_load_login () | |
Protected Member Functions inherited from CO_LL_Location | |
_default_setup () | |
_build_parameter_array () | |
_km_per_degree () | |
_fuzz_me () | |
Protected Member Functions inherited from A_CO_DB_Table_Base | |
_badger_serialize ( $in_data) | |
_badger_unserialize ( $in_data) | |
_write_to_db () | |
_seppuku () | |
Protected Member Functions inherited from tCO_Collection | |
_scrub () | |
_set_up_container () | |
Private Attributes | |
$_login_object = NULL | |
The Security DB COBRA login instance associated with this user. More... | |
Additional Inherited Members | |
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... | |
Static Public Attributes inherited from CO_Main_DB_Record | |
static | $s_table_name = 'co_data_nodes' |
Protected Attributes inherited from CO_LL_Location | |
$_longitude | |
$_latitude | |
Protected Attributes inherited from CO_Main_DB_Record | |
$_owner_id | |
$_tags | |
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... | |
Protected Attributes inherited from tCO_Collection | |
$_container | |
This contains instances of the records referenced by the IDs stored in the object. More... | |
This is a container, meant to define a user.
A user is a collection, with various data items attached to it.
The first seven tags are reserved for the class:
It also has a single link to a login (which can be NULL, if the user is not one that can log into the system).
As with other login-related classes, only login managers that have access to security tokens (which are also IDs of login and other security DB items) can set certain IDs as tokens.
Definition at line 68 of file co_user_collection.class.php.
CO_User_Collection::__construct | ( | $in_db_object = NULL , |
|
$in_db_result = NULL , |
|||
$in_owner_id = NULL , |
|||
$in_tags_array = NULL |
|||
) |
Constructor (Initializer)
$in_db_object | The database object for this instance. |
$in_db_result | The database row for this instance (associative array, with database keys). |
$in_owner_id | The ID of the object (in the database) that "owns" this instance. |
$in_tags_array | An array of strings, up to ten elements long, for the tags. Tag 0 MUST be a single integer (as a string), with the ID of the login object associated with this instance. |
Reimplemented from CO_Main_DB_Record.
Definition at line 122 of file co_user_collection.class.php.
|
protected |
Definition at line 76 of file co_user_collection.class.php.
References CO_CHAMELEON_Lang_Common\$user_error_code_invalid_class, CO_CHAMELEON_Lang_Common\$user_error_code_invalid_id, CO_CHAMELEON_Lang_Common\$user_error_code_user_not_authorized, CO_CHAMELEON_Lang\$user_error_desc_invalid_class, CO_CHAMELEON_Lang\$user_error_desc_invalid_id, CO_CHAMELEON_Lang\$user_error_desc_user_not_authorized, CO_CHAMELEON_Lang\$user_error_name_invalid_class, CO_CHAMELEON_Lang\$user_error_name_invalid_id, CO_CHAMELEON_Lang\$user_error_name_user_not_authorized, A_CO_DB_Table_Base\get_access_object(), and CO_Main_DB_Record\tags().
Referenced by get_login_instance(), and is_manager().
CO_User_Collection::delete_from_db | ( | $with_extreme_prejudice = false , |
|
$delete_login_object_too = false |
|||
) |
We override this, because we want to see if they want us to delete associated objects.
$with_extreme_prejudice | If true (Default is false), then we will attempt to delete all contained children. Remember that this could cause problems if other collections can see the children! |
$delete_login_object_too | If true (Default is false), then we will attempt to delete any associated login object, as well. |
Definition at line 448 of file co_user_collection.class.php.
References tCO_Collection\children(), get_login_instance(), and A_CO_DB_Table_Base\user_can_write().
CO_User_Collection::get_given_name | ( | ) |
Simple getter for the given (first) name tag (tag 3).
Definition at line 306 of file co_user_collection.class.php.
CO_User_Collection::get_lang | ( | ) |
We override this, because we see if we need to fetch our lang from the login object.
Reimplemented from A_CO_DB_Table_Base.
Definition at line 429 of file co_user_collection.class.php.
References get_login_instance().
CO_User_Collection::get_login_instance | ( | ) |
Accessor for the login object.
Note that this may return NULL, even if there is a login, as the current user may not have permission to see that login.
Definition at line 159 of file co_user_collection.class.php.
References $_login_object, and _load_login().
Referenced by delete_from_db(), get_lang(), and has_login_i_cant_see().
CO_User_Collection::get_middle_name | ( | ) |
Simple getter for the middle name tag (tag 2).
Definition at line 285 of file co_user_collection.class.php.
CO_User_Collection::get_nickname | ( | ) |
Simple getter for the nickname tag (tag 6).
Definition at line 369 of file co_user_collection.class.php.
CO_User_Collection::get_prefix | ( | ) |
Simple getter for the prefix tag (tag 4).
Definition at line 327 of file co_user_collection.class.php.
CO_User_Collection::get_suffix | ( | ) |
Simple getter for the suffix tag (tag 5).
Definition at line 348 of file co_user_collection.class.php.
CO_User_Collection::get_surname | ( | ) |
Simple getter for the surname tag (tag 1).
Definition at line 264 of file co_user_collection.class.php.
CO_User_Collection::has_login | ( | ) |
This is a "security-safe" way of testing for an associated login object. The user may have permission to view the user, but not the login, and they should not know what the login ID is, so this masks the ID.
Definition at line 173 of file co_user_collection.class.php.
References CO_Main_DB_Record\tags().
CO_User_Collection::has_login_i_cant_see | ( | ) |
This is a "security-safe" way of testing for a login ID that the current user can't see. The user may have permission to view the user, but not the login, and they should not know what the login ID is, so this masks the ID.
Definition at line 183 of file co_user_collection.class.php.
References get_login_instance(), and CO_Main_DB_Record\tags().
CO_User_Collection::is_god | ( | ) |
This is a "security-safe" way of testing for a God login ID. The user may have permission to view the user, but not the login, and they should not know what the login ID is, so this masks the ID.
Definition at line 194 of file co_user_collection.class.php.
References tCO_Collection\count(), and CO_Main_DB_Record\tags().
Referenced by is_manager().
CO_User_Collection::is_manager | ( | ) |
Definition at line 204 of file co_user_collection.class.php.
References _load_login(), and is_god().
CO_User_Collection::load_from_db | ( | $in_db_result | ) |
This function sets up this instance, according to the DB-formatted associative array passed in.
$in_db_result | This is an associative array, formatted as a database row response. |
Reimplemented from CO_LL_Location.
Definition at line 142 of file co_user_collection.class.php.
References tCO_Collection\_set_up_container().
CO_User_Collection::set_given_name | ( | $in_given_name | ) |
Simple setter for the given (first) tag (tag 3).
$in_given_name | A string, containing the user middle name. |
Definition at line 316 of file co_user_collection.class.php.
References set_tag().
CO_User_Collection::set_login | ( | $in_login_id_integer | ) |
This sets the login ID, and has the object regenerate the new instance.
This can only be done by a COBRA Login Manager that has write access to the user object and the login object. The manager does not have to have write access to the login object, but it does need read access to it.
$in_login_id_integer | The integer ID of the login object to be associated with this instance. |
Definition at line 393 of file co_user_collection.class.php.
References CO_CHAMELEON_Lang_Common\$user_error_code_user_not_authorized, CO_CHAMELEON_Lang\$user_error_desc_user_not_authorized, CO_CHAMELEON_Lang\$user_error_name_user_not_authorized, A_CO_DB_Table_Base\get_access_object(), and set_tag().
CO_User_Collection::set_middle_name | ( | $in_middle_name | ) |
Simple setter for the surname tag (tag 2).
$in_middle_name | A string, containing the user middle name. |
Definition at line 295 of file co_user_collection.class.php.
References set_tag().
CO_User_Collection::set_nickname | ( | $in_nickname | ) |
Simple setter for the nickname tag (tag 6).
$in_nickname | A string, containing the user nickname. |
Definition at line 379 of file co_user_collection.class.php.
References set_tag().
CO_User_Collection::set_prefix | ( | $in_prefix | ) |
Simple setter for the prefix tag (tag 4).
$in_prefix | A string, containing the user prefix. |
Definition at line 337 of file co_user_collection.class.php.
References set_tag().
CO_User_Collection::set_suffix | ( | $in_suffix | ) |
Simple setter for the suffix tag (tag 5).
$in_suffix | A string, containing the user suffix. |
Definition at line 358 of file co_user_collection.class.php.
References set_tag().
CO_User_Collection::set_surname | ( | $in_surname | ) |
Simple setter for the surname tag (tag 1).
$in_surname | A string, containing the user surname. |
Definition at line 274 of file co_user_collection.class.php.
References set_tag().
CO_User_Collection::set_tag | ( | $in_tag_index, | |
$in_tag_value | |||
) |
Setter for one tag, by index.
$in_tag_index | The index (0-based -0 through 9) of the tag to set. |
$in_tag_value | A string, with the tag value. |
Reimplemented from CO_Main_DB_Record.
Definition at line 240 of file co_user_collection.class.php.
References tCO_Collection\count(), A_CO_DB_Table_Base\get_access_object(), and A_CO_DB_Table_Base\user_can_write().
Referenced by set_given_name(), set_login(), set_middle_name(), set_nickname(), set_prefix(), set_suffix(), and set_surname().
CO_User_Collection::set_tags | ( | $in_tags_array | ) |
Simple setter for the tags.
$in_tags_array | An array of strings, up to ten elements long, for the tags. |
Reimplemented from CO_Main_DB_Record.
Definition at line 218 of file co_user_collection.class.php.
References tCO_Collection\count(), and A_CO_DB_Table_Base\get_access_object().
|
private |
The Security DB COBRA login instance associated with this user.
Definition at line 70 of file co_user_collection.class.php.
Referenced by get_login_instance().