Re: [Fwd: LU Getting Group Info]
Matthias Nothhaft <[email protected]> Tue, 24 Jan 2006 16:47:48 +0100
| Newsgroups | gmane.comp.php.pear.liveuser |
|---|---|
| Message-ID | <[email protected]> |
Lukas Kahwe Smith schrieb: > Hi, > > we have a problem in the way getRights() handles groups. > its currently impossible to really filter by grouprights > so this is only an admin issue, right? > see below .. also see bug http://pear.php.net/bugs/bug.php?id=6417 > > the problem is that it usually only makes sense to either join by > userrights or by grouprights .. > > so I am proposing the following change. I am not yet sure if this should > be an additional parameter or should be folded into $params. probably better to put it into params, there could be more problems... > > there is a new parameter for getRights() that determines if joins should > be done using the 'userrights' (default) or through the 'grouprights' > and 'groupusers' tables > > // use 'userrights' table > $LUAdmin->getRights($params); > $LUAdmin->getRights($params, true); > > // use 'grouprights' and 'groupusers' tables > $LUAdmin->getRights($params, false); > I would prefer the inverted logic: getRights($params, $by_group = false) or $params['by_group'] but this is only my personal feeling. regards, Matthias