Remembering not working
Closed this issue · 1 comments
dattz commented
So.. I implemented this as follows (not clear how I'm supposed to do this). I need two type of accounts - clients and freelancers:
'multi' => array(
'client' => array(
'driver' => 'eloquent',
'model' => 'Client'
),
'freelancer' => array(
'driver' => 'eloquent',
'model' => 'Freelancer'
),
'user' => array(
'driver' => 'database',
'table' => 'users'
)
),
Then I tried running this:
Auth::freelancer()->attempt(array(
'email' => 'def',
'password' => '123',
), true);
The user is logged in, the remember_token field is given a value (I checked the DB). However, on next page load.. The user is not logged in...
dattz commented
Sorry, my bad.
For testing purposes, I was using "echo" and "var_dump" BEFORE returning the View.
This prevented Session data to be sent in headers, and hence, user's details were not being saved in sessions.