-
Notifications
You must be signed in to change notification settings - Fork 35
icms_member_Handler
Notice: Wiki was automatic generated from project sources as project API documentation. Do not edit manually!
Member handler class.
This class provides simple interface (a facade class) for handling groups/users/ membership data.
- Class name: icms_member_Handler
- Namespace:
protected mixed $_uHandler
holds reference to user handler(DAO) class
- Visibility: protected
protected mixed $db
- Visibility: protected
private mixed $_gHandler
- Visibility: private
private mixed $_mHandler
holds reference to membership handler(DAO) class
- Visibility: private
private mixed $_members = array()
holds temporary user objects
- Visibility: private
mixed icms_member_Handler::__construct(mixed db)
constructor
- Visibility: public
- db mixed
\icms_member_group_Object icms_member_Handler::createGroup(mixed isNew)
create a new group
- Visibility: public
- isNew mixed
\icms_member_user_Object icms_member_Handler::createUser(mixed isNew)
create a new user
- Visibility: public
- isNew mixed
bool icms_member_Handler::deleteGroup(\icms_member_group_Object group)
delete a group
- Visibility: public
- group icms_member_group_Object - <p>reference to the group to delete</p>
bool icms_member_Handler::deleteUser(\icms_member_user_Object user)
delete a user
- Visibility: public
- user icms_member_user_Object - <p>reference to the user to delete</p>
bool icms_member_Handler::insertGroup(\icms_member_group_Object group)
insert a group into the database
- Visibility: public
- group icms_member_group_Object - <p>reference to the group to insert</p>
\icms_member_group_Object[] icms_member_Handler::getGroups(\icms_db_criteria_Element criteria, bool id_as_key)
retrieve groups from the database
- Visibility: public
- criteria icms_db_criteria_Element - <p>Criteria</p>
- id_as_key bool - <p>use the group's ID as key for the array?</p>
\icms_member_user_Object[] icms_member_Handler::getUsers(\icms_db_criteria_Element criteria, bool id_as_key)
retrieve users from the database
- Visibility: public
- criteria icms_db_criteria_Element - <p>Criteria</p>
- id_as_key bool - <p>use the group's ID as key for the array?</p>
array icms_member_Handler::getGroupList(\icms_db_criteria_Element criteria)
get a list of groupnames and their IDs
- Visibility: public
- criteria icms_db_criteria_Element - <p>Criteria object</p>
array icms_member_Handler::getUserList(\icms_db_criteria_Element criteria)
get a list of usernames and their IDs
- Visibility: public
- criteria icms_db_criteria_Element - <p>Criteria object</p>
bool icms_member_Handler::addUserToGroup(int group_id, int user_id)
add a user to a group
- Visibility: public
- group_id int - <p>ID of the group</p>
- user_id int - <p>ID of the user</p>
bool icms_member_Handler::removeUsersFromGroup(int group_id, array user_ids)
remove a list of users from a group
- Visibility: public
- group_id int - <p>ID of the group</p>
- user_ids array - <p>array of user-IDs</p>
array|\icms_member_user_Object[] icms_member_Handler::getUsersByGroup(int group_id, bool asobject, int limit, int start)
get a list of users belonging to a group
- Visibility: public
- group_id int - <p>ID of the group</p>
- asobject bool - <p>return the users as objects?</p>
- limit int - <p>number of users to return</p>
- start int - <p>index of the first user to return</p>
\icms_member_user_Object icms_member_Handler::getUser(int id)
retrieve a user
- Visibility: public
- id int - <p>ID for the user</p>
\icms_member_user_Object|bool icms_member_Handler::loginUser(string uname, string pwd)
log in a user
- Visibility: public
- uname string - <p>username as entered in the login form</p>
- pwd string - <p>password entered in the login form</p>
mixed icms_member_Handler::icms_getLoginFromUserEmail(mixed email)
- Visibility: public
- email mixed
int icms_member_Handler::getUserCount(\icms_db_criteria_Element criteria)
count users matching certain conditions
- Visibility: public
- criteria icms_db_criteria_Element - <p>Criteria object</p>
int icms_member_Handler::getUserCountByGroup(int group_id)
count users belonging to a group
- Visibility: public
- group_id int - <p>ID of the group</p>
bool icms_member_Handler::updateUserByField(\icms_member_user_Object user, string fieldName, string fieldValue)
updates a single field in a users record
- Visibility: public
- user icms_member_user_Object - <p>reference</p>
- fieldName string - <p>name of the field to update</p>
- fieldValue string - <p>updated value for the field</p>
bool icms_member_Handler::insertUser(\icms_member_user_Object user, mixed force)
insert a user into the database
- Visibility: public
- user icms_member_user_Object - <p>User</p>
- force mixed
bool icms_member_Handler::updateUsersByField(string fieldName, string fieldValue, \icms_db_criteria_Element criteria)
updates a single field in a users record
- Visibility: public
- fieldName string - <p>name of the field to update</p>
- fieldValue string - <p>updated value for the field</p>
- criteria icms_db_criteria_Element - <p>Criteria object</p>
bool icms_member_Handler::activateUser(\icms_member_user_Object user)
activate a user
- Visibility: public
- user icms_member_user_Object - <p>User</p>
array|\icms_member_user_Object[] icms_member_Handler::getUsersByGroupLink(int groups, \icms_db_criteria_Element criteria, bool asobject, bool id_as_key)
Get a list of users belonging to certain groups and matching criteria Temporary solution
- Visibility: public
- groups int - <p>IDs of groups</p>
- criteria icms_db_criteria_Element - <p>Criteria object</p>
- asobject bool - <p>return the users as objects?</p>
- id_as_key bool - <p>use the UID as key for the array if $asobject is TRUE</p>
int icms_member_Handler::getUserCountByGroupLink(array groups, mixed criteria)
Get count of users belonging to certain groups and matching criteria Temporary solution
- Visibility: public
- groups array - <p>IDs of groups</p>
- criteria mixed
int icms_member_Handler::getUserBestGroup(int uid)
Gets the usergroup with the most rights for a specific userid
- Visibility: public
- uid int - <p>the userid to get the usergroup for</p>
array|\icms_member_group_Object[] icms_member_Handler::getGroupsByUser(int user_id, bool asobject)
get a list of groups that a user is member of
- Visibility: public
- user_id int - <p>ID of the user</p>
- asobject bool - <p>return groups as icms_member_group_Object objects or arrays?</p>
\icms_member_group_Object|null icms_member_Handler::getGroup(int id)
retrieve a group
- Visibility: public
- id int - <p>ID for the group</p>