Hello,
we have 4 tables :
users
id
login
groups
id
name
users_groups
user_id
group_id
rights:
group_id
var
value
we have User model with only:
public $hasAndBelongsToMany = array(
'Groups' => array('className' => 'Groups',
'joinTable' =>
'users_groups',
'foreignKey' => 'user_id',
'associationForeignKey' => 'group_id',
'conditions' => '',
'order' => '',
'limit' => '',
'uniq' => false,
'finderQuery' => '',
'deleteQuery' => '',
'insertQuery' => ''
),
);
and the group model with :
public $hasAndBelongsToMany = array(
'Users' => array('className' => 'Users',
'joinTable' =>
'users_groups',
'foreignKey' => 'group_id',
'associationForeignKey' => 'user_id',
'conditions' => '',
'order' => '',
'limit' => '',
'uniq' => false,
'finderQuery' => '',
'deleteQuery' => '',
'insertQuery' => ''
),
);
public $hasMany = array(
'rights' => array(
'className' => 'rights',
),
);
When i use $this->User->findByLogin() i dont retrieve rights.
My question is how can i get rights for a specified user.
PS: i know there is a auth component but i dont want to use it.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---