Hi,

I use User model to handle user's basic data such as Name, username,
password and so on.

The User model is associated with Rule model by belongsTo association,
while Rule model is associated to User model by hasMany association.

The later model "Rule" is meant by something like users groups so it
handles name, description, value and of-course id, for example, two
records from rules table:

id -> 1
name -> Administrators
description -> The super users group!
value -> ABC

id -> 2
name -> Editors
decription -> reviewers and articles writers.
value -> BC

In AuthComponent documentation :
http://book.cakephp.org/view/247/AuthComponent-Methods#user-387

when they talked about "user" method of the component, they regards
that it is possible to retrieve the current user data from the session
in the view like:

# $session->read('Auth.User.first_name') //returns particular field
value

This example shows that the access of User model property first_name.

My Question Is,

How could I able to access the associated model property "Rule" such
as Rule.name ?

Best Regards!

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

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

Reply via email to