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:

http://api.cakephp.org/class/auth-component#method-AuthComponentuser

Parameters:
    $key        string  field to retrive. Leave null to get entire User
record  optional        NULL

if ($key == null) {
  $model =& $this->getModel();
  return array($model->alias => $this->Session->read($this-
>sessionKey));
} else {

And, of course, $this->sessionKey cannot be some arbitrary string that
the component doesn't know about. It can't read your mind so it
defaults to what it knows. Namely, 'Auth.User'.

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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to