Re: Auth component not returning user data on manual login (CakePHP 2.0.3)

2011-11-28 Thread Pratz_
Ah, that did the trick. Thanks! On Nov 28, 12:43 pm, elitalon elita...@gmail.com wrote: According to documentation (http://api20.cakephp.org/class/auth- component#method-AuthComponentlogin) if you login a user with a custom array, only the information in that array is populated in

Re: Auth component not returning user data on manual login (CakePHP 2.0.3)

2011-11-27 Thread Pratz_
I tried doing: $this-Auth-login($data['User']); It too successfully logins the user, but the user data is still not accessible via Auth component. $this-Auth-user('id') still returns NULL. On Nov 25, 12:01 pm, elitalon elita...@gmail.com wrote: If `$data` is an array built like as if it was

Re: Auth component not returning user data on manual login (CakePHP 2.0.3)

2011-11-27 Thread elitalon
According to documentation (http://api20.cakephp.org/class/auth- component#method-AuthComponentlogin) if you login a user with a custom array, only the information in that array is populated in AuthComponent. Thus, if you want to retrieve the ID you must ensure that the ID is present in

Auth component not returning user data on manual login (CakePHP 2.0.3)

2011-11-24 Thread Pratz_
Hi, I have been trying to manually login a user in version 2.0.3 using: $this-Auth-login($data). Though it successfully logins the user, and can read user data through $this-Session-read('Auth.User.id'), the Auth Component does not return the user data. $this-Auth-user('id') returns NULL. Thus

Re: Auth component not returning user data on manual login (CakePHP 2.0.3)

2011-11-24 Thread elitalon
If `$data` is an array built like as if it was the result of a `find('first')`, i.e. indexed by your user model name, try using `$this-Auth-login($data['User'])` instead of `$this-Auth-login($data)` On Nov 24, 7:42 am, Pratz_ pratyushmit...@gmail.com wrote: Hi, I have been trying to