[development] modify permissions using hook_menu_alter()

Lluís enboig at gmail.com
Tue Apr 28 16:24:25 UTC 2009


Well, that was an example, the permission of a user to belong to a
role or not can change during its session; so I need a way to make it
change dynamically during the session.


On Tue, Apr 28, 2009 at 6:16 PM, Earnie Boyd
<earnie at users.sourceforge.net> wrote:
> Quoting Lluís <enboig at gmail.com>:
>
>> After reading og_user_roles I found I was able to modify $user->roles
>> in hook_boot(); so no more changes are necessary
>>
>> It is a completely different approach, but everything is simplier in
>> this way; I just need to create a role with the permissions I want,
>> and then at hook_boot(); add the role to the users I want.
>>
>
> Or even easier just add the role to the user via the admin/user/user UI.
>
> --
> Earnie
> -- http://r-feed.com/           -- http://for-my-kids.com/
> -- http://www.4offer.biz/       -- http://give-me-an-offer.com/
>
>



-- 
*La vida és com una taronja, que esperes a exprimir-la?
*Si creus que l'educació és cara, prova la ignorància.
*La vida és com una moneda, la pots gastar en el que vulguis però
només una vegada.
*Abans d'imprimir aquest missatge, pensa en el medi ambient.


More information about the development mailing list