Hi there, I'm replacing the processForm() method in the sfGuardUser
Doctrine admin generator module. We have:
if($form->isValid())
{
$sf_guard_user = $form->save();
// I've added this next line, you'll see why
$sf_guard_user->reloadGroupsAndPermissions();
// and some veeery basic debugging:
print_r($sf_guard_user->groups->toArray());
exit;
}
When I add a new user and select one or more groups, it is
successfully saved with the relations, viewing the DB or simply
listing in admin generator proves this. I cannot figure out for the
life of me however why the above outputs: Array() - it shouldn't be
empty at this point should it, especially after I've 'forced' a reload
of groups and permissions relations? I need access to this new user's
selected groups so I can decide whether to raise a specific event or
not.
Thanks for any help in advance,
John
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---