Re: roles result

Manuel Holtgrewe <[email protected]> Sat, 05 Mar 2005 00:23:01 +0100
Newsgroups gmane.comp.lib.binarycloud.devel
Message-ID <[email protected]>
Jean-Christophe Michel schrieb:
> Hi Manuel,
> 
> Roles returned by Perm::getActiveRoles($user->getId())
> are of the form
> array( array('id' => 1, 'name' => 'role.Editor'));
> 
> Why not simply have
> array( 1 => 'role.Editor',
>       id => name) ?
> 
> Would be simpler to test for a role (with in_array).

Yes, it would be simpler. However, I think the API should be consistent 
and always return full roles data sets.


Manuel
_______________________________________________
dev mailing list
dev-PnctHDZWAvB/Cz2I37pSEPZ4XP/[email protected]
http://lists.binarycloud.com/mailman/listinfo/dev