6.0.0-beta1
▾
Tasks
New Task
Search
Photos
Wiki
▾
Tickets
New Ticket
Search
dev.horde.org
Toggle Alerts Log
Help
11/22/25
H
istory
A
ttachments
C
omment
W
atch
Download
Comment on [#1928] when using hooks as Group backend doesn't work correctly
*
Your Email Address
*
Spam protection
Enter the letters below:
.__ ..__..__ .___. [__) || |[__) _/ | \__||__\| \./__.
Comment
> There are different default values in Group.php and Group/hooks.php > methods causing invalid method retun values (for groups and > premission methods). For example, when using hooks and group B is > subgroup of A and user U is in the group B, then userIsInGroup("U", > "A", true) returns false. Please apply following patch (++ modify > method comments ;-) ): > > > > diff -u ../horde-portal/lib/Horde/Group/hooks.php lib/Horde/Group/hooks.php > > --- ../horde-portal/lib/Horde/Group/hooks.php Fri Jan 7 01:23:57 2005 > > +++ lib/Horde/Group/hooks.php Sat May 7 20:36:25 2005 > > @@ -33,9 +33,9 @@ > > * > > * @return array An array of all groups the user is in. > > */ > > - function getGroupMemberships($user) > > + function getGroupMemberships($user, $parentGroups = false) > > { > > - $memberships = parent::getGroupMemberships($user); > > + $memberships = parent::getGroupMemberships($user, $parentGroups); > > $funcs = get_defined_functions(); > > foreach ($funcs['user'] as $funcName) { > > if (strpos($funcName, '_group_hook_') === 0) { > > @@ -62,7 +62,7 @@ > > * @access public > > * @return boolean > > */ > > - function userIsInGroup($user, $group, $subgroups = false) > > + function userIsInGroup($user, $group, $subgroups = true) > > { > > if ($this->hasHook($group)) { > > if (call_user_func($this->_getGroupHookName($group), $user)) { > >
Attachment
Watch this ticket
N
ew Ticket
M
y Tickets
S
earch
Q
uery Builder
R
eports
Saved Queries
Open Bugs
Bugs waiting for Feedback
Open Bugs in Releases
Open Enhancements
Enhancements waiting for Feedback
Bugs with Patches
Enhancements with Patches
Release Showstoppers
Stalled Tickets
New Tickets
Horde 5 Showstoppers