[ class tree: Geeklog ] [ index: Geeklog ] [ all elements ]

Procedural File: group.php

Source Location: /public_html/admin/group.php

Page Details:

This file is the Geeklog Group administration page


author:  Tony Bibbs, tony AT tonybibbs DOT com


require_once('../lib-common.php') [line 45]
Geeklog common function library

require_once('') [line 50]
Security check to ensure user even belongs on this page

applydefaultgroup [line 487]

void applydefaultgroup( int $grp_id, [boolean $add = true])

Add or remove a default group to/from all existing accounts


int   $grp_id   ID of default group
boolean   $add   true: add, false: remove
[ Top ]

deleteGroup [line 1135]

string deleteGroup( int $grp_id)

Delete a group


return:  HTML redirect


int   $grp_id   id of group to delete
[ Top ]

editgroup [line 78]

string editgroup( [string $grp_id = ''])

Shows the group editor form


return:  HTML for group editor


string   $grp_id   ID of group to edit
[ Top ]

editusers [line 992]

string editusers( int $group)

Allow easy addition/removal of users to/from a group


return:  HTML form


int   $group   Group ID
[ Top ]

getGroupList [line 703]

array getGroupList( int $basegroup)

Get a list (actually an array) of all groups this group belongs to.


return:  array of all groups $basegroup belongs to


int   $basegroup   id of group
[ Top ]

getIndirectFeatures [line 313]

string getIndirectFeatures( int $grp_id)

Get the indirect features for a group, i.e. a list of all the features that this group inherited from other groups.


return:  comma-separated list of feature names


int   $grp_id   ID of group
[ Top ]

grp_selectUsers [line 944]

string grp_selectUsers( int $group_id, [boolean $allusers = false])

Get list of users in a given group

Effectively, this function is used twice: To get a list of all users currently in the given group and to get all list of all users NOT in that group.


return:  option list containing uids and usernames


int   $group_id   group id
boolean   $allusers   true: return users not in the group
[ Top ]

listgroups [line 848]

string listgroups( [boolean $show_all_groups = false])

Display a list of (all) groups


return:  HTML of the group list


boolean   $show_all_groups   include admin groups if true
[ Top ]

listusers [line 739]

string listusers( int $grp_id)

Display a list of all users in a given group.


return:  HTML for user listing


int   $grp_id   group id
[ Top ]

printrights [line 365]

string printrights( [mixed $grp_id = ''], [boolean $core = 0])

Prints the features a group has access. Please follow the comments in the code closely if you need to modify this function. Also right is synonymous with feature.


return:  HTML for rights


mixed   $grp_id   ID to print rights for
boolean   $core   indicates if group is a core Geeklog group
[ Top ]

savegroup [line 540]

string savegroup( string $grp_id, string $grp_name, string $grp_descr, boolean $grp_admin, boolean $grp_gl_core, boolean $grp_default, boolean $grp_applydefault, array $features, array $groups)

Save a group to the database


return:  HTML refresh or error message


string   $grp_id   ID of group to save
string   $grp_name   Group Name
string   $grp_descr   Description of group
boolean   $grp_admin   Flag that indicates this is an admin use group
boolean   $grp_gl_core   Flag that indicates if this is a core Geeklog group
boolean   $grp_default   Flag that indicates if this is a default group
boolean   $grp_applydefault   Flag that indicates whether to apply a change in $grp_default to all existing user accounts
array   $features   Features the group has access to
array   $groups   Groups this group will belong to
[ Top ]

savegroupusers [line 1075]

void savegroupusers( int $groupid, string $groupmembers)

Save changes from the form to add/remove users to/from groups


int   $groupid   id of the group being changed
string   $groupmembers   list of group members
[ Top ]

Documentation generated on Sun, 02 Oct 2016 07:49:25 +0000 by phpDocumentor 1.4.3