PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Authentication » LiveUser » Bug #6517

$lu->getproperty('allgroups')

Details

Request #6517$lu->getproperty('allgroups')
Submitted2006-01-18 15:27 UTC
Frommurphy at spreekonzept dot de
Assignedlsmith
StatusClosed
PackageLiveUser
PHP VersionIrrelevant
Roadmaps(Not assigned)

Comments

[2006-01-18 15:27 UTC] murphy at spreekonzept dot de

Description:
------------
Currently, the $lu->getproperty('group_ids') delivers

a) MEDIUM: all group-id's of groups the user is in (because
subgroups are not available in this Schema)

b) COMPLEX: all group-id's of groups and subgroup-id's the
user is in

I have written an application with the Complex-Schema and
came to a point where it would've been helpful to get all
group-id's of groups the user is in, but no subgroups -
because the system in my case only allowed one group per
user (with as many subgroups you want) and I wanted a quick
way to get the group-id of the user.

ATM this is only possible by instantiating a LiveUser_Admin
object.

This is one of some cases I stumbled upon, where the
seperation of Auth/Perm/Admin resulted in a dirty
architectural decision, where it could've been so easy.

This is just a suggestion and based on a (german) discussion
here: http://www.pear-forum.de/ftopic919.html

Greetings,
Thomas

[2006-01-18 15:33 UTC] murphy at spreekonzept dot de

Well seems I actually forgot the suggestion itself:

Seperate $lu->getproperty('group_ids') into

$lu->getproperty('group_ids') => get all groups, no subgroups
$lu->getproperty('all_group_ids') => get all groups with
subgroups