[Tickets #1715] NEW: Group_hooks class updates

bugs at bugs.horde.org bugs at bugs.horde.org
Thu Apr 7 13:39:39 PDT 2005


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=1715
-----------------------------------------------------------------------
 Ticket             | 1715
 Created By         | erudd at netfor.com
 Summary            | Group_hooks class updates
 Queue              | Horde Framework Packages
 State              | New
 Priority           | 2. Medium
 Type               | Enhancement
 Owners             | 
+New Attachment     | group_hooks.diff
-----------------------------------------------------------------------


erudd at netfor.com (2005-04-07 13:39) wrote:

Attached is a diff off of the horde 3.0.4 Horde/Group/hooks.php that adds 3
new hooks and fixes (as much as possible) the getGroupMemberships function.

_group_hook function  takes $user and $group 
is a better replacement for the _group_hook_GroupName hooks. part of the
reasons are explained in the patch itself (due to limitations of php).. The
other reason is it's easier for a dynamic list of groups (ie pulling in ldap
groups).

_group_members_hook takes $group
This hook will return an array of all the users in a group (merged with the
datatree group list).  AFACT this would anly be userful for seeing the
groups in the group list. 

_group_memberships_hook takes $user
This hook is the second half of the replacement for the
_group_hook_GroupName and returns a list of groups that a user belongs to
(flat array with :'s in the group names).


There are several fixes to the class as well, the getGroupMemberships
function requires an index array of groupnames in the form of
  groupID => 'groupname'

so my _group_memberships_hook addon correctly returns the same "style"
infomation as the getGroupMemberships function in the datatree version.  I
also patched the _group_hook_GroupName loop to place the groupID in the
return array as well, otherwise the user would not have the correct rights






More information about the bugs mailing list