I have made some debugging and it seems that $gids array in naoLogin stays empty (although user has groups assigned). The $row has only User values - no Group, no Permission.
I have tried to change unbindAll in naoLogin from belongsTo into hasAndBelongsToMany and it authentises OK. But now I have no access. This might be resolvable. I'll try to solve this and keep all informed. LSL LSL napsal: > Hallo. > I have made othAuth working just in oth mode according to othAuth > documentation (http://bakery.cakephp.org/articles/view/148). I would > like to make it working in nao mode so I can have more groups user > belongs to. > > I have not found any docs about this mode so I have tried to do it > myself. > 1) I have created table: > CREATE TABLE `users_groups` ( > `user_id` int(10) unsigned NOT NULL default "0", > `group_id` int(10) unsigned NOT NULL default "0", > KEY `user_id` (`user_id`,`group_id`) > > 2) I have dropped group_id in users table. > > 3) I have adjusted models according to this new scheme: > Users: var $hasAndBelongsToMany = > array('Group'=>array('className'=>'Group','joinTable'=>'users_groups')); > Groups: var $hasAndBelongsToMany = array('Permission' ... 'User' > =>array('className' => 'User', 'joinTable' => 'users_groups')); > > 4) Changed 'mode' to 'nao' in app_controller.php > > But now it seems I cannot login. What am I doing wrong? Or is there > some mini-howto for nao? > > Thanks... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" 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/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---
