XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
XoopsMemberHandler Class Reference

Public Member Functions

 activateUser (&$user)
 
 addUserToGroup ($group_id, $user_id)
 
createGroup ()
 
createUser ()
 
 deleteGroup (&$group)
 
 deleteUser (&$user)
 
 getGroup ($id)
 
 getGroupList ($criteria=null)
 
 getGroups ($criteria=null, $id_as_key=false)
 
 getGroupsByUser ($user_id, $asobject=false)
 
getUser ($id)
 
 getUserCount ($criteria=null)
 
 getUserCountByGroup ($group_id)
 
 getUserCountByGroupLink ($groups, $criteria=null)
 
 getUserList ($criteria=null)
 
 getUsers ($criteria=null, $id_as_key=false)
 
 getUsersByGroup ($group_id, $asobject=false, $limit=0, $start=0)
 
 getUsersByGroupLink ($groups, $criteria=null, $asobject=false, $id_as_key=false)
 
 insertGroup (&$group)
 
 insertUser (&$user, $force=false)
 
loginUser ($uname, $pwd)
 
loginUserMd5 ($uname, $md5pwd)
 
 removeUsersFromGroup ($group_id, $user_ids=array())
 
 updateUserByField (&$user, $fieldName, $fieldValue)
 
 updateUsersByField ($fieldName, $fieldValue, $criteria=null)
 
 XoopsMemberHandler (&$db)
 

Public Attributes

 $_gHandler
 
 $_members = array()
 
 $_mHandler
 
 $_uHandler
 

Detailed Description

Definition at line 35 of file member.php.

Member Function Documentation

XoopsMemberHandler::activateUser ( $user)

activate a user

Parameters
object$userreference to the XoopsUser object
Returns
bool successful?

Definition at line 399 of file member.php.

References $user.

XoopsMemberHandler::addUserToGroup (   $group_id,
  $user_id 
)

add a user to a group

Parameters
int$group_idID of the group
int$user_idID of the user
Returns
object XoopsMembership

Definition at line 231 of file member.php.

References $user_id.

& XoopsMemberHandler::createGroup ( )

create a new group

Returns
object XoopsGroup reference to the new group

Definition at line 76 of file member.php.

& XoopsMemberHandler::createUser ( )

create a new user

Returns
object XoopsUser reference to the new user

Definition at line 87 of file member.php.

XoopsMemberHandler::deleteGroup ( $group)

delete a group

Parameters
object$groupreference to the group to delete
Returns
bool FALSE if failed

Definition at line 124 of file member.php.

XoopsMemberHandler::deleteUser ( $user)

delete a user

Parameters
object$userreference to the user to delete
Returns
bool FALSE if failed

Definition at line 137 of file member.php.

References $user.

XoopsMemberHandler::getGroup (   $id)

retrieve a group

Parameters
int$idID for the group
Returns
object XoopsGroup reference to the group

Definition at line 99 of file member.php.

XoopsMemberHandler::getGroupList (   $criteria = null)

get a list of groupnames and their IDs

Parameters
object$criteriaCriteriaElement object
Returns
array associative array of group-IDs and names

Definition at line 198 of file member.php.

References $criteria, $groups, $i, and $ret.

XoopsMemberHandler::getGroups (   $criteria = null,
  $id_as_key = false 
)

retrieve groups from the database

Parameters
object$criteriaCriteriaElement
bool$id_as_keyuse the group's ID as key for the array?
Returns
array array of XoopsGroup objects

Definition at line 175 of file member.php.

References $criteria.

XoopsMemberHandler::getGroupsByUser (   $user_id,
  $asobject = false 
)

get a list of groups that a user is member of

Parameters
int$user_idID of the user
bool$asobjectreturn groups as XoopsGroup objects or arrays?
Returns
array array of objects or arrays

Definition at line 293 of file member.php.

References $ret, and $user_id.

& XoopsMemberHandler::getUser (   $id)

retrieve a user

Parameters
int$idID for the user
Returns
object XoopsUser reference to the user

Definition at line 110 of file member.php.

XoopsMemberHandler::getUserCount (   $criteria = null)

count users matching certain conditions

Parameters
object$criteriaCriteriaElement object
Returns
int

Definition at line 350 of file member.php.

References $criteria.

XoopsMemberHandler::getUserCountByGroup (   $group_id)

count users belonging to a group

Parameters
int$group_idID of the group
Returns
int

Definition at line 361 of file member.php.

XoopsMemberHandler::getUserCountByGroupLink (   $groups,
  $criteria = null 
)

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

Parameters
int$groupsIDs of groups
Returns
int count of users

Definition at line 477 of file member.php.

References $criteria, $groups, $result, $ret, and $sql.

XoopsMemberHandler::getUserList (   $criteria = null)

get a list of usernames and their IDs

Parameters
object$criteriaCriteriaElement object
Returns
array associative array of user-IDs and names

Definition at line 214 of file member.php.

References $criteria, $i, and $ret.

XoopsMemberHandler::getUsers (   $criteria = null,
  $id_as_key = false 
)

retrieve users from the database

Parameters
object$criteriaCriteriaElement
bool$id_as_keyuse the group's ID as key for the array?
Returns
array array of XoopsUser objects

Definition at line 187 of file member.php.

References $criteria.

XoopsMemberHandler::getUsersByGroup (   $group_id,
  $asobject = false,
  $limit = 0,
  $start = 0 
)

get a list of users belonging to a group

Parameters
int$group_idID of the group
bool$asobjectreturn the users as objects?
int$limitnumber of users to return
int$startindex of the first user to return
Returns
array Array of XoopsUser objects (if $asobject is TRUE) or of associative arrays matching the record structure in the database.

Definition at line 268 of file member.php.

References $limit, $ret, $start, and $user.

XoopsMemberHandler::getUsersByGroupLink (   $groups,
  $criteria = null,
  $asobject = false,
  $id_as_key = false 
)

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

Parameters
array$groupsIDs of groups
object$criteriaCriteriaElement object
bool$asobjectreturn the users as objects?
bool$id_as_keyuse the UID as key for the array if $asobject is TRUE
Returns
array Array of XoopsUser objects (if $asobject is TRUE) or of associative arrays matching the record structure in the database.

Definition at line 419 of file member.php.

References $criteria, $groups, $limit, $result, $ret, $sql, $start, and $user.

XoopsMemberHandler::insertGroup ( $group)

insert a group into the database

Parameters
object$groupreference to the group to insert
Returns
bool TRUE if already in database and unchanged FALSE on failure

Definition at line 151 of file member.php.

XoopsMemberHandler::insertUser ( $user,
  $force = false 
)

insert a user into the database

Parameters
object$userreference to the user to insert
Returns
bool TRUE if already in database and unchanged FALSE on failure

Definition at line 163 of file member.php.

References $user.

& XoopsMemberHandler::loginUser (   $uname,
  $pwd 
)

log in a user

Parameters
string$unameusername as entered in the login form
string$pwdpassword entered in the login form
Returns
object XoopsUser reference to the logged in user. FALSE if failed to log in

Definition at line 313 of file member.php.

References $criteria, $uname, and $user.

& XoopsMemberHandler::loginUserMd5 (   $uname,
  $md5pwd 
)

logs in a user with an nd5 encrypted password

Parameters
string$unameusername
string$md5pwdpassword encrypted with md5
Returns
object XoopsUser reference to the logged in user. FALSE if failed to log in

Definition at line 332 of file member.php.

References $criteria, $uname, and $user.

XoopsMemberHandler::removeUsersFromGroup (   $group_id,
  $user_ids = array() 
)

remove a list of users from a group

Parameters
int$group_idID of the group
array$user_idsarray of user-IDs
Returns
bool success?

Definition at line 246 of file member.php.

References $criteria, $criteria2, and $uid.

XoopsMemberHandler::updateUserByField ( $user,
  $fieldName,
  $fieldValue 
)

updates a single field in a users record

Parameters
object$userreference to the XoopsUser object
string$fieldNamename of the field to update
string$fieldValueupdated value for the field
Returns
bool TRUE if success or unchanged, FALSE on failure

Definition at line 374 of file member.php.

References $user.

XoopsMemberHandler::updateUsersByField (   $fieldName,
  $fieldValue,
  $criteria = null 
)

updates a single field in a users record

Parameters
string$fieldNamename of the field to update
string$fieldValueupdated value for the field
object$criteriaCriteriaElement object
Returns
bool TRUE if success or unchanged, FALSE on failure

Definition at line 388 of file member.php.

References $criteria.

XoopsMemberHandler::XoopsMemberHandler ( $db)

#@- constructor

Definition at line 64 of file member.php.

References $db.

Member Data Documentation

XoopsMemberHandler::$_gHandler

#@+ holds reference to group handler(DAO) class private

Definition at line 42 of file member.php.

XoopsMemberHandler::$_members = array()

holds temporary user objects

Definition at line 57 of file member.php.

XoopsMemberHandler::$_mHandler

holds reference to membership handler(DAO) class

Definition at line 52 of file member.php.

XoopsMemberHandler::$_uHandler

holds reference to user handler(DAO) class

Definition at line 47 of file member.php.


The documentation for this class was generated from the following file: