Adrian, This behavior appears to be by design. If you look at http://api.cakephp.org/1.2/libs_2model_2behaviors_2acl_8php-source.html#l00092 you can see that it specifically tests for if $created before adding it to the database.
I'm not certain why this is but I'm sure there is a good reason. There is an enhancement ticket requesting this functionality though https://trac.cakephp.org/ticket/3143 Geoff -- http://lemoncake.wordpress.com On Aug 28, 11:19 pm, Flan <[EMAIL PROTECTED]> wrote: > Hello, > > I have been trying out Acl and adding Aros with Users and Groups along > the same lines as: > > http://bakery.cakephp.org/articles/view/how-to-use-acl-in-1-2-xhttp://lemoncake.wordpress.com/ > > It seems to work fine but then I find a problem. > > I setup the Users/Groups as follows > > Group1 > ------> User1 > ------> User2 > Group2 > -------> User3 > -------> User4 > > where Group hasMany User and User belongsTo Group etc. I use the baked > scaffolded functions to add Groups and Users to the Groups as above. > The Aros are added to the Aro table as expected. > > Next I edit User1 using the scaffolding edit function and change User1 > from Group1 to Group2. This works ok but the Aro table is not updated > to reflect this change and the aro associated with User1 is still a > child of Group1's aro. > > I have checked a little and it seems the afterSave() function in > acl.php is called after User1 is created but not called after User1 is > edited. > > I was wondering if anyone has tried something similar and could > explain this behavior? > > Thanks, > > Adrian --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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 -~----------~----~----~----~------~----~------~--~---