Just 1 line : 113

        if (!$data['User']['parent_id']){

should be
 if (!$data['User']['role_id']){

Then I guess your problem adding a new user should be solved,
Now when you change the current role of a user, you should check the
new parent_id (if it changes) and set the proper parent Aro ..

hth

On Jul 4, 9:50 pm, José Pablo Orozco Marín <[EMAIL PROTECTED]> wrote:
> Thanks francky06l,
>
> In my code:http://bin.cakephp.org/view/313440863
>
> What do you think i need to change?
>
> francky06l escribió:
>
>
>
> > Adding a user should be automagic (using the ACL behavior, and
> > parentNode in model), changing the role requires a bit of coding, but
> > very simple ..
>
> > On Jul 4, 9:28 pm, Josoroma <[EMAIL PROTECTED]> wrote:
>
> >> Thanks to the kitchen example 
> >> from:http://aranworld.com/article/170/cakephp-acl-and-auth-sample-website
>
> >> Now im having Roles instead of Groups working. Now we can add user to
> >> ARO groups without problems. Few minutes ago i noticed when i delete a
> >> user, it is automatically removed from aros table, nice magic.
>
> >> But when i add or edit a user i have to manually create or update de
> >> aros table in the model, no magic. My question is: There exist some
> >> magic to add user to aros table? im missing something from acl
> >> behavior? or a better way to improve this code in terms of adding or
> >> editing a new user:http://bin.cakephp.org/view/313440863
>
> >> Thanks in advance.
>
> --
>
> ------------------------------------------------------------
>
> Con toda libertad consulte:
>
> http://www.SukiaLogic.com/blog
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to