[ Index ]
 

Code source de XOOPS 2.0.17.1

Accédez au Source d'autres logiciels libres

title

Body

[fermer]

/htdocs/kernel/ -> member.php (sommaire)

(pas de description)

Poids: 507 lignes (17 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

XoopsMemberHandler:: (26 méthodes):
  XoopsMemberHandler()
  createGroup()
  createUser()
  getGroup()
  getUser()
  deleteGroup()
  deleteUser()
  insertGroup()
  insertUser()
  getGroups()
  getUsers()
  getGroupList()
  getUserList()
  addUserToGroup()
  removeUsersFromGroup()
  getUsersByGroup()
  getGroupsByUser()
  loginUser()
  loginUserMd5()
  getUserCount()
  getUserCountByGroup()
  updateUserByField()
  updateUsersByField()
  activateUser()
  getUsersByGroupLink()
  getUserCountByGroupLink()


Classe: XoopsMemberHandler  - X-Ref

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

XoopsMemberHandler(&$db)   X-Ref
constructor


createGroup()   X-Ref
create a new group

return: object XoopsGroup reference to the new group

createUser()   X-Ref
create a new user

return: object XoopsUser reference to the new user

getGroup($id)   X-Ref
retrieve a group

param: int $id ID for the group
return: object XoopsGroup reference to the group

getUser($id)   X-Ref
retrieve a user

param: int $id ID for the user
return: object XoopsUser reference to the user

deleteGroup(&$group)   X-Ref
delete a group

param: object $group reference to the group to delete
return: bool FALSE if failed

deleteUser(&$user)   X-Ref
delete a user

param: object $user reference to the user to delete
return: bool FALSE if failed

insertGroup(&$group)   X-Ref
insert a group into the database

param: object $group reference to the group to insert
return: bool TRUE if already in database and unchanged

insertUser(&$user, $force = false)   X-Ref
insert a user into the database

param: object $user reference to the user to insert
return: bool TRUE if already in database and unchanged

getGroups($criteria = null, $id_as_key = false)   X-Ref
retrieve groups from the database

param: object $criteria {@link CriteriaElement}
param: bool $id_as_key use the group's ID as key for the array?
return: array array of {@link XoopsGroup} objects

getUsers($criteria = null, $id_as_key = false)   X-Ref
retrieve users from the database

param: object $criteria {@link CriteriaElement}
param: bool $id_as_key use the group's ID as key for the array?
return: array array of {@link XoopsUser} objects

getGroupList($criteria = null)   X-Ref
get a list of groupnames and their IDs

param: object $criteria {@link CriteriaElement} object
return: array associative array of group-IDs and names

getUserList($criteria = null)   X-Ref
get a list of usernames and their IDs

param: object $criteria {@link CriteriaElement} object
return: array associative array of user-IDs and names

addUserToGroup($group_id, $user_id)   X-Ref
add a user to a group

param: int $group_id ID of the group
param: int $user_id ID of the user
return: object XoopsMembership

removeUsersFromGroup($group_id, $user_ids = array()   X-Ref
remove a list of users from a group

param: int $group_id ID of the group
param: array $user_ids array of user-IDs
return: bool success?

getUsersByGroup($group_id, $asobject = false, $limit = 0, $start = 0)   X-Ref
get a list of users belonging to a group

param: int $group_id ID of the group
param: bool $asobject return the users as objects?
param: int $limit number of users to return
param: int $start index of the first user to return
return: array Array of {@link XoopsUser} objects (if $asobject is TRUE)

getGroupsByUser($user_id, $asobject = false)   X-Ref
get a list of groups that a user is member of

param: int $user_id ID of the user
param: bool $asobject return groups as {@link XoopsGroup} objects or arrays?
return: array array of objects or arrays

loginUser($uname, $pwd)   X-Ref
log in a user

param: string $uname username as entered in the login form
param: string $pwd password entered in the login form
return: object XoopsUser reference to the logged in user. FALSE if failed to log in

loginUserMd5($uname, $md5pwd)   X-Ref
logs in a user with an nd5 encrypted password

param: string $uname username
param: string $md5pwd password encrypted with md5
return: object XoopsUser reference to the logged in user. FALSE if failed to log in

getUserCount($criteria = null)   X-Ref
count users matching certain conditions

param: object $criteria {@link CriteriaElement} object
return: int

getUserCountByGroup($group_id)   X-Ref
count users belonging to a group

param: int $group_id ID of the group
return: int

updateUserByField(&$user, $fieldName, $fieldValue)   X-Ref
updates a single field in a users record

param: object $user reference to the {@link XoopsUser} object
param: string $fieldName name of the field to update
param: string $fieldValue updated value for the field
return: bool TRUE if success or unchanged, FALSE on failure

updateUsersByField($fieldName, $fieldValue, $criteria = null)   X-Ref
updates a single field in a users record

param: string $fieldName name of the field to update
param: string $fieldValue updated value for the field
param: object $criteria {@link CriteriaElement} object
return: bool TRUE if success or unchanged, FALSE on failure

activateUser(&$user)   X-Ref
activate a user

param: object $user reference to the {@link XoopsUser} object
return: bool successful?

getUsersByGroupLink($groups, $criteria = null, $asobject = false, $id_as_key = false)   X-Ref
Get a list of users belonging to certain groups and matching criteria
Temporary solution

param: int $groups IDs of groups
param: object $criteria {@link CriteriaElement} object
param: bool $asobject return the users as objects?
param: bool $id_as_key use the UID as key for the array if $asobject is TRUE
return: array Array of {@link XoopsUser} objects (if $asobject is TRUE)

getUserCountByGroupLink($groups, $criteria = null)   X-Ref
Get count of users belonging to certain groups and matching criteria
Temporary solution

param: int $groups IDs of groups
return: int count of users



Généré le : Sun Nov 25 11:44:32 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics