Overview

Packages

  • Auth
    • Ads
    • Ldap
    • Xoops
  • Autotasks
  • Config
    • Category
    • Item
    • Option
  • Core
    • Filesystem
    • Filters
    • Logger
    • Mail
    • Message
    • Password
    • Security
    • StopSpammer
    • Template
    • Textsanitizer
    • VersionChecker
  • Data
    • Avatar
    • Comment
  • Database
    • Connection
    • Criteria
    • Legacy
    • MySQL
    • PDO
    • Updater
  • Feeds
    • RSS
  • File
  • Form
    • Base
    • Elements
  • ICMS
    • IPF
      • View
  • Image
    • Category
  • Ipf
    • Category
    • Controller
    • Export
    • form
    • Keyhighlighter
    • Member
    • Object
    • Permission
    • richfile
    • Tree
    • urllink
    • View
  • kernel
    • Set
  • Member
    • Group
    • GroupMembership
    • GroupPermission
    • User
  • Messaging
  • Module
  • None
  • Notification
  • Page
  • Plugins
    • Editor
  • Preload
    • Libraries
  • Privmessage
  • Session
  • SmartObject
  • View
    • Block
    • Breadcrumb
    • PageNav
    • PrinterFriendly
    • Template
    • Templates
    • Theme
    • Tree

Classes

  • icms_member_Handler
  • Overview
  • Package
  • Class

Class icms_member_Handler

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

Direct known subclasses

icms_ipf_member_Handler
Package: Member
Category: ICMS
Copyright: Copyright (c) 2000 XOOPS.org
License: LICENSE.txt
Author: Kazumi Ono onokazu@xoops.org
Located at member/Handler.php
Methods summary
public
# __construct( & $db )

constructor

constructor

public object &
# createGroup( & $isNew = TRUE )

create a new group

create a new group

Returns

object
icms_member_group_Object icms_member_group_Object reference to the new group
public object &
# createUser( & $isNew = TRUE )

create a new user

create a new user

Returns

object
icms_member_user_Object icms_member_user_Object reference to the new user
public object
# getGroup( integer $id )

retrieve a group

retrieve a group

Parameters

$id
ID for the group

Returns

object
icms_member_group_Object icms_member_group_Object reference to the group
public object &
# getUser( integer $id )

retrieve a user

retrieve a user

Parameters

$id
ID for the user

Returns

object
icms_member_user_Object icms_member_user_Object reference to the user
public boolean
# deleteGroup( object & $group )

delete a group

delete a group

Parameters

$group
icms_member_group_Object reference to the group to delete

Returns

boolean
FALSE if failed
public boolean
# deleteUser( object & $user )

delete a user

delete a user

Parameters

$user
icms_member_user_Object reference to the user to delete

Returns

boolean
FALSE if failed
public boolean
# insertGroup( object & $group )

insert a group into the database

insert a group into the database

Parameters

$group
icms_member_group_Object reference to the group to insert

Returns

boolean

TRUE if already in database and unchanged FALSE on failure

public boolean
# insertUser( object & $user, $force = false )

insert a user into the database

insert a user into the database

Parameters

$user
icms_member_user_Object reference to the user to insert
$force

Returns

boolean

TRUE if already in database and unchanged FALSE on failure

public array
# getGroups( object $criteria = null, boolean $id_as_key = false )

retrieve groups from the database

retrieve groups from the database

Parameters

$criteria
icms_db_criteria_Element
$id_as_key
use the group's ID as key for the array?

Returns

array
array of icms_member_group_Object objects
public array
# getUsers( object $criteria = null, boolean $id_as_key = false )

retrieve users from the database

retrieve users from the database

Parameters

$criteria
icms_db_criteria_Element
$id_as_key
use the group's ID as key for the array?

Returns

array
array of icms_member_user_Object objects
public array
# getGroupList( object $criteria = null )

get a list of groupnames and their IDs

get a list of groupnames and their IDs

Parameters

$criteria
icms_db_criteria_Element object

Returns

array
associative array of group-IDs and names
public array
# getUserList( object $criteria = null )

get a list of usernames and their IDs

get a list of usernames and their IDs

Parameters

$criteria
icms_db_criteria_Element object

Returns

array
associative array of user-IDs and names
public object
# addUserToGroup( integer $group_id, integer $user_id )

add a user to a group

add a user to a group

Parameters

$group_id
ID of the group
$user_id
ID of the user

Returns

object
icms_member_group_membership_Object icms_member_group_membership_Object
public boolean
# removeUsersFromGroup( integer $group_id, array $user_ids = array() )

remove a list of users from a group

remove a list of users from a group

Parameters

$group_id
ID of the group
$user_ids
array of user-IDs

Returns

boolean
success?
public array
# getUsersByGroup( integer $group_id, boolean $asobject = false, integer $limit = 0, integer $start = 0 )

get a list of users belonging to a group

get a list of users belonging to a group

Parameters

$group_id
ID of the group
$asobject
return the users as objects?
$limit
number of users to return
$start
index of the first user to return

Returns

array

Array of icms_member_user_Object objects (if $asobject is TRUE) or of associative arrays matching the record structure in the database.

public array
# getGroupsByUser( integer $user_id, boolean $asobject = false )

get a list of groups that a user is member of

get a list of groups that a user is member of

Parameters

$user_id
ID of the user
$asobject
return groups as icms_member_group_Object objects or arrays?

Returns

array
array of objects or arrays
public
# icms_getLoginFromUserEmail( $email = '' )
public object
# loginUser( string $uname, string $pwd )

log in a user

log in a user

Parameters

$uname
username as entered in the login form
$pwd
password entered in the login form

Returns

object
icms_member_user_Object icms_member_user_Object reference to the logged in user. FALSE if failed to log in
public integer
# getUserCount( object $criteria = null )

count users matching certain conditions

count users matching certain conditions

Parameters

$criteria
icms_db_criteria_Element object

Returns

integer
public integer
# getUserCountByGroup( integer $group_id )

count users belonging to a group

count users belonging to a group

Parameters

$group_id
ID of the group

Returns

integer
public boolean
# updateUserByField( object & $user, string $fieldName, string $fieldValue )

updates a single field in a users record

updates a single field in a users record

Parameters

$user
icms_member_user_Object reference to the icms_member_user_Object object
$fieldName
name of the field to update
$fieldValue
updated value for the field

Returns

boolean
TRUE if success or unchanged, FALSE on failure
public boolean
# updateUsersByField( string $fieldName, string $fieldValue, object $criteria = null )

updates a single field in a users record

updates a single field in a users record

Parameters

$fieldName
name of the field to update
$fieldValue
updated value for the field
$criteria
icms_db_criteria_Element object

Returns

boolean
TRUE if success or unchanged, FALSE on failure
public boolean
# activateUser( object & $user )

activate a user

activate a user

Parameters

$user
icms_member_user_Object reference to the object

Returns

boolean
successful?
public array
# getUsersByGroupLink( integer $groups, object $criteria = null, boolean $asobject = false, boolean $id_as_key = false )

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

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

Parameters

$groups
IDs of groups
$criteria
icms_db_criteria_Element object
$asobject
return the users as objects?
$id_as_key
use the UID as key for the array if $asobject is TRUE

Returns

array

Array of icms_member_user_Object objects (if $asobject is TRUE) or of associative arrays matching the record structure in the database.

public integer
# getUserCountByGroupLink( array $groups, $criteria = null )

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

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

Parameters

$groups
IDs of groups
$criteria

Returns

integer
count of users
public integer
# getUserBestGroup( integer $uid )

Gets the usergroup with the most rights for a specific userid

Gets the usergroup with the most rights for a specific userid

Parameters

$uid
the userid to get the usergroup for

Returns

integer
the best usergroup belonging to the userid
Properties summary
protected $db
#
API documentation generated by ApiGen