This could be the case - a wrongly implemented Authentication system. @Joey
Hauschildt $this-Auth-user() and the Auth.User Session key should both
return/contain the full user information - i.e. all fields from the users
DB table. This behaviour is strange. Can you provide more info on your
I just followed the tutorial in the book. The only custimization I made was
was using the email field instead of the username field.
Here is my AppController:
class AppController extends Controller {
public $uses = array('User');
public $components = array(
'Session',
Like I said: You are passing data into the login function. In 2.0 this
will log the user in with whatever data is posted. Thats why only the
two fields posted are displayed and the PW isn't hashed. Since you
haven't specified what version of cake you are using, I still assume
this is the
Yup, let me clarify a bit more, you're passing $this-reuqest-data into
$this-Auth-login():
$this-Auth-login($this-request-data)
This will always log the user in no matter what is posted!
On Thursday, 21 June 2012 00:37:07 UTC+3, Max Dörfler wrote:
Like I said: You are passing data into the
debug($this-Session-read('Auth.User')); and debug($this-Auth-User());
both return:
array(
'User' = array(
'password' = '*',
'email' = 't...@example.com'
)
)
These are the fields that the user uses to log in. The password isn't even
hashed. When I print_r, it displays the actual password. I
You should be hashing the password before saving it.
Jeremy Burns
Class Outfit
http://www.classoutfit.com
On 19 Jun 2012, at 19:41:30, Joey Hauschildt wrote:
debug($this-Session-read('Auth.User')); and debug($this-Auth-User());
both return:
array(
'User' = array(
I am. All passwords in the db are hashed. The problem seems to be that
instead of getting info from the users table, it is only filling
debug($this-Session-read('Auth.User'));
and debug($this-Auth-User()) with data from the form. Otherwise the
password would be hashed. It has nowhere else to
http://book.cakephp.org/2.0/en/core-libraries/components/authentication.html#identifying-users-and-logging-them-in
In 2.0 $this-Auth-login($this-request-data) will log the user in
with whatever data is posted, whereas in 1.3
$this-Auth-login($this-data) would try to identify the user first and
Hello,
I hava a similar problem, From mi actual code I extract this sample adjust
the Session content whenever I need more nformation, for example:
1 ) Set
class AppController extends Controller {
function beforeFilter() {
...
$this-Auth-redirect = false;
...
}
}
2)
Does anyone know how to get user variables from the Auth from a different
Table?
[Auth] = Array
(
[User] = Array
(
[id] = 6
[username] = mary
[email] =
[group_id] = 4
You have to do it by hands, using find() and beforeAction() on some
actions where you need profile info. Auth doesn't get related data.
On 11 мар, 05:47, Dave Maharaj :: WidePixels.com
d...@widepixels.com wrote:
Does anyone know how to get user variables from the Auth from a different
Table?
11 matches
Mail list logo