Class OCSP_GROUPTREE

Description

handels groups

Located in /user/OCSP_GROUPTREE.phpclass (line 75)

OCSP_OBJ
   |
   --OCSP_GROUPTREE
Class Constant Summary
 CLASS_SRC_FILE = __FILE__
Variable Summary
Method Summary
 OCSP_GROUPTREE __construct ()
 void addUserToGroup (int $usrId, int $grpId, [boolean $readOnlay = False], [boolean $asAdmin = False], [boolean $debug = False])
 array getAllChildGroups (int $parentId, [array $setGroups = Null], [boolean $debug = False])
 array getChildGroups (int $parentId, [boolean $debug = false])
 void getGroupName ( $aId)
 array getGroupRow (int $aId, [boolean $debug = False])
 array getGroupTreeArray ([boolean $debug = false], boolean $withSystemGroups)
 array getUserGroupTreeArray ([boolean $debug = false])
 void populateGroups ([ $debug = false])
 void removeUserFromGroup (int $usrId, int $grpId)
 void setUsersAdminFlag (int $usrId, int $grpId, boolean $asAdmin, [boolean $debug = False])
 void setUsersROFlag (int $usrId, int $grpId,  $readOnly, [boolean $debug = False], boolean $asAdmin)
 boolean userIsAdmin (int $grpId, int $usrId, [boolean $debug = false])
 boolean userIsMember (int $grpId, int $usrId, [boolean $withAdmin = false], [boolean $debug = false])
 array _addChildGroupToArray (array &$retArr, int $parentId, string $keyPrepend, [boolean $debug = false])
 void _usrGroupTreeSetShow ( &$arr_groups,  $grpId,  $debug)
Variables
static OCSP_GROUPTREE $instance (line 95)

singleton instance

  • access: private
array $checkedgroups = array() (line 139)

array with checked groups for a user

$this->checkedgroups[M|A][usrId][grpId] = True

  • access: private
boolean $hasChanged = false (line 130)

flag to notice if the class attributes has changed

  • access: protected
array $myChildTree = array() (line 108)
  • access: protected
array $myGroupAdmins = array() (line 123)

array with already seen group admins

  • access: protected
array $myGroupMembers = array() (line 116)

array with already seen group members

  • access: protected
array $myGroups = array() (line 103)
  • access: protected

Inherited Variables

Inherited from OCSP_OBJ

OCSP_OBJ::$global_currentUser
OCSP_OBJ::$global_defaultDBObj_read
OCSP_OBJ::$global_defaultDBObj_write
OCSP_OBJ::$myDBObj
OCSP_OBJ::$staticClassVars
Methods
static getInstance (line 147)

returns the object instance

  • access: public
OCSP_GROUPTREE getInstance ()
Constructor __construct (line 160)

constructor

  • access: protected
OCSP_GROUPTREE __construct ()
addUserToGroup (line 765)

adds a user to a group

  • version: pk-08-06-12
  • access: public
void addUserToGroup (int $usrId, int $grpId, [boolean $readOnlay = False], [boolean $asAdmin = False], [boolean $debug = False])
  • int $usrId
  • int $grpId
  • boolean $readOnlay
  • boolean $asAdmin
  • boolean $debug
getAllChildGroups (line 344)

returns an array with all children (including childrens of children) of a group

  • since: pk-08-06-05
  • access: public
array getAllChildGroups (int $parentId, [array $setGroups = Null], [boolean $debug = False])
  • int $parentId
  • array $setGroups: already set groups to avoid loops on misconfigured groups
  • boolean $debug
getChildGroups (line 317)

returns an array with the 1st level children of a group

  • since: pk-08-03-27
  • access: public
array getChildGroups (int $parentId, [boolean $debug = false])
  • int $parentId
  • boolean $debug
getGroupName (line 230)
  • access: public
void getGroupName ( $aId)
  • $aId
getGroupRow (line 197)

returns a group row also for system groups

  • access: public
array getGroupRow (int $aId, [boolean $debug = False])
  • int $aId
  • boolean $debug
getGroupTreeArray (line 286)

returns an array with all groups

  • access: public
array getGroupTreeArray ([boolean $debug = false], boolean $withSystemGroups)
  • boolean $withSystemGroups
  • boolean $debug
getUserGroupTreeArray (line 389)

returns the group tree with additional informations for the current user

the return array looks like:

    • TREEIDX (0001.0001. ...)
    • ROW (the database row of the group)
    • MEMBER (the user is member of the group)
    • ADMIN (the user is admin of the group)
    • SHOW (the group is on the pass to a group the user is member or admin)

    • access: public
    array getUserGroupTreeArray ([boolean $debug = false])
    • boolean $debug
    populateGroups (line 165)
    • access: public
    void populateGroups ([ $debug = false])
    • $debug
    removeUserFromGroup (line 805)

    removes a user from a group

    • access: public
    void removeUserFromGroup (int $usrId, int $grpId)
    • int $usrId
    • int $grpId
    setUsersAdminFlag (line 847)

    sets a users admin flag

    • since: pk-08-06-12
    • access: public
    void setUsersAdminFlag (int $usrId, int $grpId, boolean $asAdmin, [boolean $debug = False])
    • int $usrId
    • int $grpId
    • boolean $asAdmin
    • boolean $debug
    setUsersROFlag (line 902)

    sets a users read only flag

    • since: pk-08-06-12
    • access: public
    void setUsersROFlag (int $usrId, int $grpId,  $readOnly, [boolean $debug = False], boolean $asAdmin)
    • int $usrId
    • int $grpId
    • boolean $asAdmin
    • boolean $debug
    • $readOnly
    userIsAdmin (line 667)

    returns if a user is admin of $grpId

    • version: pk-08-03-29
    • access: public
    boolean userIsAdmin (int $grpId, int $usrId, [boolean $debug = false])
    • int $grpId
    • int $usrId
    • boolean $debug
    userIsMember (line 446)

    returns if a user is member of a group

    • an entry in T_SYS_GROUPMEMBER is found
    • the user is member of a parent group
    • GRP_PASSDOWN_RIGHTS = 1 and user is member of a direct children

    • global: $OCSP_OBJ 0:
    • version: pk-08-03-29
    • access: public
    boolean userIsMember (int $grpId, int $usrId, [boolean $withAdmin = false], [boolean $debug = false])
    • int $grpId
    • int $usrId
    • boolean $withAdmin: (include group admins)
    • boolean $debug
    _addChildGroupToArray (line 248)

    appends a child tree to $retArr

    • access: protected
    array _addChildGroupToArray (array &$retArr, int $parentId, string $keyPrepend, [boolean $debug = false])
    • array &$retArr
    • int $parentId
    • string $keyPrepend
    • boolean $debug
    _usrGroupTreeSetShow (line 358)
    • access: private
    void _usrGroupTreeSetShow ( &$arr_groups,  $grpId,  $debug)
    • &$arr_groups
    • $grpId
    • $debug

    Inherited Methods

    Inherited From OCSP_OBJ

     OCSP_OBJ::castObj()
     OCSP_OBJ::cloneMe()
     OCSP_OBJ::currentUser()
     OCSP_OBJ::dbConnect()
     OCSP_OBJ::defaultDBObj()
     OCSP_OBJ::defaultReadDBObj()
     OCSP_OBJ::defaultWriteDBObj()
     OCSP_OBJ::getConf()
     OCSP_OBJ::getDBObj()
     OCSP_OBJ::get_myClassConstant()
     OCSP_OBJ::get_myObject_vars()
     OCSP_OBJ::get_mySourceFile()
     OCSP_OBJ::isConnected()
     OCSP_OBJ::isMultiByteStr()
     OCSP_OBJ::isUTF8()
     OCSP_OBJ::setConf()
     OCSP_OBJ::setDBObj()
     OCSP_OBJ::set_myObject_vars()
     OCSP_OBJ::set_myVarsFrom()
    Class Constants
    CLASS_SRC_FILE = __FILE__ (line 86)
    • abstract:

    Inherited Constants

    Inherited from OCSP_OBJ

    OCSP_OBJ::CLASS_SRC_FILE

    Documentation generated on Thu, 08 Jan 2009 17:46:49 +0100 by phpDocumentor 1.4.0a2