Skip to content

icms_member_Handler

Raimondas Rimkevičius edited this page Mar 9, 2020 · 1 revision
Notice: Wiki was automatic generated from project sources as project API documentation. Do not edit manually!

icms_member_Handler

Member handler class.

This class provides simple interface (a facade class) for handling groups/users/ membership data.

  • Class name: icms_member_Handler
  • Namespace:

Properties

$_uHandler

protected mixed $_uHandler

holds reference to user handler(DAO) class

  • Visibility: protected

$db

protected mixed $db
  • Visibility: protected

$_gHandler

private mixed $_gHandler
  • Visibility: private

$_mHandler

private mixed $_mHandler

holds reference to membership handler(DAO) class

  • Visibility: private

$_members

private mixed $_members = array()

holds temporary user objects

  • Visibility: private

Methods

__construct

mixed icms_member_Handler::__construct(mixed db)

constructor

  • Visibility: public

Arguments

  • db mixed

createGroup

\icms_member_group_Object icms_member_Handler::createGroup(mixed isNew)

create a new group

  • Visibility: public

Arguments

  • isNew mixed

createUser

\icms_member_user_Object icms_member_Handler::createUser(mixed isNew)

create a new user

  • Visibility: public

Arguments

  • isNew mixed

deleteGroup

bool icms_member_Handler::deleteGroup(\icms_member_group_Object group)

delete a group

  • Visibility: public

Arguments

deleteUser

bool icms_member_Handler::deleteUser(\icms_member_user_Object user)

delete a user

  • Visibility: public

Arguments

insertGroup

bool icms_member_Handler::insertGroup(\icms_member_group_Object group)

insert a group into the database

  • Visibility: public

Arguments

getGroups

\icms_member_group_Object[] icms_member_Handler::getGroups(\icms_db_criteria_Element criteria, bool id_as_key)

retrieve groups from the database

  • Visibility: public

Arguments

getUsers

\icms_member_user_Object[] icms_member_Handler::getUsers(\icms_db_criteria_Element criteria, bool id_as_key)

retrieve users from the database

  • Visibility: public

Arguments

getGroupList

array icms_member_Handler::getGroupList(\icms_db_criteria_Element criteria)

get a list of groupnames and their IDs

  • Visibility: public

Arguments

getUserList

array icms_member_Handler::getUserList(\icms_db_criteria_Element criteria)

get a list of usernames and their IDs

  • Visibility: public

Arguments

addUserToGroup

bool icms_member_Handler::addUserToGroup(int group_id, int user_id)

add a user to a group

  • Visibility: public

Arguments

  • group_id int - <p>ID of the group</p>
  • user_id int - <p>ID of the user</p>

removeUsersFromGroup

bool icms_member_Handler::removeUsersFromGroup(int group_id, array user_ids)

remove a list of users from a group

  • Visibility: public

Arguments

  • group_id int - <p>ID of the group</p>
  • user_ids array - <p>array of user-IDs</p>

getUsersByGroup

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

Arguments

  • 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>

getUser

\icms_member_user_Object icms_member_Handler::getUser(int id)

retrieve a user

  • Visibility: public

Arguments

  • id int - <p>ID for the user</p>

loginUser

\icms_member_user_Object|bool icms_member_Handler::loginUser(string uname, string pwd)

log in a user

  • Visibility: public

Arguments

  • uname string - <p>username as entered in the login form</p>
  • pwd string - <p>password entered in the login form</p>

icms_getLoginFromUserEmail

mixed icms_member_Handler::icms_getLoginFromUserEmail(mixed email)
  • Visibility: public

Arguments

  • email mixed

getUserCount

int icms_member_Handler::getUserCount(\icms_db_criteria_Element criteria)

count users matching certain conditions

  • Visibility: public

Arguments

getUserCountByGroup

int icms_member_Handler::getUserCountByGroup(int group_id)

count users belonging to a group

  • Visibility: public

Arguments

  • group_id int - <p>ID of the group</p>

updateUserByField

bool icms_member_Handler::updateUserByField(\icms_member_user_Object user, string fieldName, string fieldValue)

updates a single field in a users record

  • Visibility: public

Arguments

  • 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>

insertUser

bool icms_member_Handler::insertUser(\icms_member_user_Object user, mixed force)

insert a user into the database

  • Visibility: public

Arguments

updateUsersByField

bool icms_member_Handler::updateUsersByField(string fieldName, string fieldValue, \icms_db_criteria_Element criteria)

updates a single field in a users record

  • Visibility: public

Arguments

  • 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>

activateUser

bool icms_member_Handler::activateUser(\icms_member_user_Object user)

activate a user

  • Visibility: public

Arguments

getUsersByGroupLink

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

Arguments

  • 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>

getUserCountByGroupLink

int icms_member_Handler::getUserCountByGroupLink(array groups, mixed criteria)

Get count of users belonging to certain groups and matching criteria Temporary solution

  • Visibility: public

Arguments

  • groups array - <p>IDs of groups</p>
  • criteria mixed

getUserBestGroup

int icms_member_Handler::getUserBestGroup(int uid)

Gets the usergroup with the most rights for a specific userid

  • Visibility: public

Arguments

  • uid int - <p>the userid to get the usergroup for</p>

getGroupsByUser

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

Arguments

  • user_id int - <p>ID of the user</p>
  • asobject bool - <p>return groups as icms_member_group_Object objects or arrays?</p>

getGroup

\icms_member_group_Object|null icms_member_Handler::getGroup(int id)

retrieve a group

  • Visibility: public

Arguments

  • id int - <p>ID for the group</p>
Clone this wiki locally