Support the ongoing development of Laravel.io →
Authentication
Last updated 2 years ago.
0

This may help. Not tested.

Add the Following functions to your User model.

public function getRememberToken()
{
    return $this->remember_token;
}

public function setRememberToken($value)
{
    $this->remember_token = $value;
}

public function getRememberTokenName()
{
    return 'remember_token';
}
Last updated 2 years ago.
0

sounds familiar

Link

Last updated 2 years ago.
0

Thanks @Sikandhar i'll test this. @swgj19 your link isn't working :-/.

Last updated 2 years ago.
0

I have the same problem, I have my User model with those 3 methods, I even changed the driver value to 'cookie' in the app/config/session.php file and it stills not working, I'm using laravel 4.2.4 btw

swgj19 said:

sounds familiar

Link The link is not working

Last updated 2 years ago.
0

Whoops, here is the link

I think we are working on something similar. My mistake was just a typo. Let me know if I can help you. Show all your code in a Pastebin and link back so I can help.

In the meantime, make sure your array is setup correctly like this example

$auth = Auth::attempt(array(
				'email'		=>	Input::get('email'),
				'password'	=>	Input::get('password'),
				'active'	=>	1
			));

Like @Sikandhar said, check to make sure the three token functions are in you User model according to a recent update

public function getRememberToken()
	{	
    return $this->remember_token;
	}

	public function setRememberToken($value)
	{
    $this->remember_token = $value;
	}	

	public function getRememberTokenName()
	{
    return 'remember_token';
	}

make sure your table is protected in the User model and is named the same as in your databse.

You said you already made a field in the database for remember_token varchar(255) and NULL.

Set your auth attempt array to a variable and do a var_dump($variable) to see if any data is going through.

It is probably a typo like I had, that is why it is returning False.

Last updated 2 years ago.
0

It seems like it is working. I just updated the token functions. Anyway thanks very much!

Last updated 2 years ago.
0

Glad you got it working.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.