Public Member Functions | |
get_all_users ($limit_from=0, $limit_results=50, $order_by= 'id', $order_by_direction= 'ASC', $filter_sql='', $member_id=NULL) | |
Returns all users. | |
count_all_users ($filter_sql= '', $member_id=NULL) | |
Counts all users with respect to filter's values. | |
get_all_users_of_member ($member_id=NULL, $limit_from=0, $limit_results=50, $order_by= 'id', $order_by_direction= 'ASC') | |
Gets all users of member. | |
get_all_users_of_members ($member_ids=NULL, $limit_from=0, $limit_results=50, $order_by= 'id', $order_by_direction= 'ASC') | |
Gets all users of members. | |
count_all_users_of_members ($member_ids=NULL) | |
Counts all users of members. | |
get_users_to_sync_vtiger ($ids, $in_set) | |
Function gets selected users. | |
login_request ($username= '', $password= '') | |
Login test function. | |
count_all_users_by_member ($member_id=NULL) | |
Counts all users belong to member. | |
username_exist ($username, $user_id=null) | |
Tests if username exist. | |
phone_exist ($phone, $user_id=null) | |
Tests if phone exist. | |
email_exist ($email, $user_id=null) | |
Tests if email exist. | |
get_users ($query) | |
Gets user whose name contains given str. | |
get_all_user_names () | |
Gets all user names. | |
get_his_users_names ($user_id) | |
Gets user's usernames. | |
get_his_username ($user_id) | |
Get user's username. | |
get_usernames ($query) | |
Gets user's usernames whose name contains given str. | |
count_dependent_items ($user_id) | |
Function searches for items dependent on given user. | |
delete_depends_items ($user_id) | |
Function searches for items dependent on given user and delete them. | |
get_user_emails ($user_id) | |
Selects all users emails. | |
get_user_by_phone_number_country_code ($number, $country_code) | |
Returns user by phone number and country code. | |
get_aro_groups_of_user ($user_id) | |
Gets ARO groups of user. | |
is_user_in_aro_group ($user_id, $aro_group) | |
Checks if user is in ARO group. | |
select_list_grouped ($optgroup=TRUE) | |
Gets array of users for selectbox. | |
get_all_by_aro_group_id ($id, $name=NULL) | |
Function gets all records, which are in given aro group by id of group. | |
get_all_not_in_by_aro_group_id ($id, $name=NULL) | |
Function gets all records, which are not in given aro group by id of group. | |
get_all_from_device_admins_by_aro_group_id ($id, $name=NULL) | |
Function gets all records, which are in given aro device_admins group by id of group. | |
get_all_not_in_from_device_admins_by_aro_group_id ($id, $name=NULL) | |
Function gets all records, which are not in given aro device_admins group by id of group. | |
get_users_not_in_engineer_of ($device_id) | |
get_full_name () | |
Gets full name of user. | |
get_full_name_with_login () | |
Gets full name of user with his login. | |
get_all_users_by_gps ($gpsx, $gpsy, $user_id=NULL) | |
get_name_with_login ($user_id=NULL) | |
__toString () | |
Gets full name of user. | |
get_user_setting ($key, $default=NULL) | |
Get user settings. | |
set_user_setting ($key, $value) | |
Sets user settings. |
Public Attributes | |
const | ASSOCIATION = 1 |
ID of association user. | |
const | MAIN_USER = 1 |
Type of user: First of users of member is main user. | |
const | USER = 2 |
Type of user: Not main users of member. | |
const | SETTINGS_MONITORING_GROUP_BY = 'monitoring_group_by' |
User settings constants. |
Static Public Attributes | |
static | $arr_sql |
Protected Attributes | |
$belongs_to = array('member') | |
$has_many | |
$has_and_belongs_to_many |
User_Model::__toString | ( | ) |
Gets full name of user.
User_Model::count_all_users | ( | $filter_sql = '' , |
|
$member_id = NULL |
|||
) |
Counts all users with respect to filter's values.
!!!!!! SECURITY WARNING !!!!!! Be careful when you using this method, param $filter_sql is unprotected for SQL injections, security should be made at controller site using Filter_form class. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
string | $filter_sql | |
integer | $member_id |
User_Model::count_all_users_by_member | ( | $member_id = NULL | ) |
Counts all users belong to member.
numeric | $member_id |
User_Model::count_all_users_of_members | ( | $member_ids = NULL | ) |
Counts all users of members.
array | $member_ids |
User_Model::count_dependent_items | ( | $user_id | ) |
Function searches for items dependent on given user.
Used for deleting user.
integer | $user_id |
User_Model::delete_depends_items | ( | $user_id | ) |
Function searches for items dependent on given user and delete them.
integer | $user_id |
User_Model::email_exist | ( | $email, | |
$user_id = null |
|||
) |
Tests if email exist.
string | ||
numeric | $user_id |
User_Model::get_all_by_aro_group_id | ( | $id, | |
$name = NULL |
|||
) |
Function gets all records, which are in given aro group by id of group.
integer | $id | |
string | $name |
User_Model::get_all_from_device_admins_by_aro_group_id | ( | $id, | |
$name = NULL |
|||
) |
Function gets all records, which are in given aro device_admins group by id of group.
integer | $id | |
string | $name |
User_Model::get_all_not_in_by_aro_group_id | ( | $id, | |
$name = NULL |
|||
) |
Function gets all records, which are not in given aro group by id of group.
integer | $id | |
string | $name |
User_Model::get_all_not_in_from_device_admins_by_aro_group_id | ( | $id, | |
$name = NULL |
|||
) |
Function gets all records, which are not in given aro device_admins group by id of group.
integer | $id | |
string | $name |
User_Model::get_all_user_names | ( | ) |
Gets all user names.
User_Model::get_all_users | ( | $limit_from = 0 , |
|
$limit_results = 50 , |
|||
$order_by = 'id' , |
|||
$order_by_direction = 'ASC' , |
|||
$filter_sql = '' , |
|||
$member_id = NULL |
|||
) |
Returns all users.
!!!!!! SECURITY WARNING !!!!!! Be careful when you using this method, param $filter_sql is unprotected for SQL injections, security should be made at controller site using Filter_form class. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
numeric | $limit_from | |
numeric | $limit_results | |
string | $order_by | |
string | $order_by_direction | |
string | $filter_sql | |
numeric | $member_id |
User_Model::get_all_users_of_member | ( | $member_id = NULL , |
|
$limit_from = 0 , |
|||
$limit_results = 50 , |
|||
$order_by = 'id' , |
|||
$order_by_direction = 'ASC' |
|||
) |
Gets all users of member.
integer | $member_id | |
integer | $limit_from | |
integer | $limit_results | |
string | $order_by | |
string | $order_by_direction |
User_Model::get_all_users_of_members | ( | $member_ids = NULL , |
|
$limit_from = 0 , |
|||
$limit_results = 50 , |
|||
$order_by = 'id' , |
|||
$order_by_direction = 'ASC' |
|||
) |
Gets all users of members.
array | $member_ids | |
integer | $limit_from | |
integer | $limit_results | |
string | $order_by | |
string | $order_by_direction |
User_Model::get_aro_groups_of_user | ( | $user_id | ) |
Gets ARO groups of user.
integer | $user_id |
User_Model::get_full_name | ( | ) |
Gets full name of user.
User_Model::get_full_name_with_login | ( | ) |
Gets full name of user with his login.
User_Model::get_his_username | ( | $user_id | ) |
Get user's username.
integer | $user_id |
User_Model::get_his_users_names | ( | $user_id | ) |
Gets user's usernames.
integer | $user_id |
User_Model::get_user_by_phone_number_country_code | ( | $number, | |
$country_code | |||
) |
Returns user by phone number and country code.
string | $number | |
string | $country_code |
User_Model::get_user_emails | ( | $user_id | ) |
Selects all users emails.
integer | $user_id |
User_Model::get_user_setting | ( | $key, | |
$default = NULL |
|||
) |
Get user settings.
string | $key | Key |
User_Model::get_usernames | ( | $query | ) |
Gets user's usernames whose name contains given str.
integer | $query |
User_Model::get_users | ( | $query | ) |
Gets user whose name contains given str.
string | $query |
User_Model::get_users_to_sync_vtiger | ( | $ids, | |
$in_set | |||
) |
Function gets selected users.
array | $ids | |
boolean | $in_set |
User_Model::is_user_in_aro_group | ( | $user_id, | |
$aro_group | |||
) |
Checks if user is in ARO group.
int | $user_id | User ID |
int | $aro_group | ARO Group |
User_Model::login_request | ( | $username = '' , |
|
$password = '' |
|||
) |
Login test function.
string | $username | |
string | $password |
User_Model::phone_exist | ( | $phone, | |
$user_id = null |
|||
) |
Tests if phone exist.
string | $phone | |
numeric | $user_id |
User_Model::select_list_grouped | ( | $optgroup = TRUE | ) |
Gets array of users for selectbox.
User_Model::set_user_setting | ( | $key, | |
$value | |||
) |
Sets user settings.
string | $key | Key |
mixed | $value | Value |
User_Model::username_exist | ( | $username, | |
$user_id = null |
|||
) |
Tests if username exist.
string | $username | |
numeric | $user_id |
|
static |
|
protected |
|
protected |