Auth Component and user information.

2010-06-07 Thread saidbakr
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

Re: Auth Component and user information.

2010-06-07 Thread cricket
On Jun 7, 11:39 am, saidbakr said@gmail.com wrote: 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.

Re: Auth Component and user information.

2010-06-07 Thread saidbakr
Well, but what about the data in the associated Model Rules? How could I get it? On Jun 7, 8:27 pm, cricket zijn.digi...@gmail.com wrote: On Jun 7, 11:39 am, saidbakr said@gmail.com wrote: Hi, I use User model to handle user's basic data such as Name, username, password and so on.

Re: Auth Component and user information.

2010-06-07 Thread saidbakr
I also noticed another thing: The output of $this-Auth-user() ,without key parameter, is an array which is listing User model only without regarding the associated model. Array ( [User] = Array ( [id] = 1 [username] = admin [name] = Said Bakr [join_date] = 2010-06-14 19:35:00 [email] =

Re: Auth Component and user information.

2010-06-07 Thread Jeremy Burns
I think the point is that as part of your log in process you scrape information from your associated model and add it to the User array. You could also do an update if the associated model data was changed, I guess. Jeremy Burns jeremybu...@me.com On 7 Jun 2010, at 19:33, saidbakr wrote: I

Re: Auth Component and user information.

2010-06-07 Thread cricket
On Jun 7, 2:19 pm, saidbakr said@gmail.com wrote: Well, but what about the data in the associated Model Rules? How could I get it? The AuthComponent does not require anything in the User::login() method. However, if you wish to run some code upon login, you implement it there. public

Re: Auth Component and user information.

2010-06-07 Thread cricket
On Jun 7, 2:33 pm, saidbakr said@gmail.com wrote: I also noticed another thing: The output of $this-Auth-user() ,without key parameter, is an array which is listing User model only without regarding the associated model. Look at the API: