The DarkAuth component just calls your User->find() method,

I would suggest you double check your User model to ensure that your
associations are set correctly there.

ie. from the SQL I would say your User model has a single group
association rather than habtm.

ModByChris




On Apr 3, 3:36 am, lirc201 <[EMAIL PROTECTED]> wrote:
> Just when I thought I have CakePHP figured out, I get a curve ball.
> I'm trying to integrate DarkAuth into my site.
>
> I have a users table, group table both with "id" columns and then a
> join table (HABTM) with group_id, and user_id columns.  I don't
> understand why Cake believes I need to have a User.group_id column.
>
> Query: SELECT `User`.`id`, `User`.`username`, `User`.`passwd`,
> `User`.`firstname`, `User`.`lastname`, `User`.`email`,
> `User`.`last_visit`, `User`.`confirmation`, `User`.`active`,
> `User`.`created`, `User`.`modified`, `Group`.`id`, `Group`.`name`,
> `Group`.`level`, `Group`.`redirect`, `Group`.`perm_type`,
> `Group`.`created`, `Group`.`modified` FROM `users` AS `User` LEFT JOIN
> `groups` AS `Group` ON (`User`.`group_id` = `Group`.`id`) WHERE
> `user`.`email` = 'emmar0se' AND `user`.`passwd` =
> 'afb2d1ffbde69e9adce0adb33b092271' AND `user`.`active` = 1 LIMIT 1
> Warning: SQL Error: 1054: Unknown column 'User.group_id' in 'on
> clause' in D:\My Documents\websites\cake\cake\libs\model\datasources
> \dbo_source.php on line 440
>
> In dark_auth.php the HABTM variable is set to true
> var $HABTM = true; //set to false if you don use a HABTM group
> relationship.
>
> Brian

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to