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

If you're using the default laravel Auth handler, you can use Redirect::intended()

http://laravel.com/docs/4.2/security#authenticating-users

Last updated 2 years ago.
0

Thanks for the reply.

I would like this link to point to the login page, then send the user to form.php once logged in

https://xx.xx.xx.x/test/test/form.php?p=259&c=gdfg56y6y

I keep getting sent to the fallback url and not the intended page.

Can anyone help?

// check password with hash in db
if (Hash::check(Input::get('password'), $user->password)){
//log them in
Auth::login($user);
// redirect to original path, otherwise fallback to 'test'
return Redirect::intended('test');
}else{
// password fail, redirect to login
return Redirect::to('admin/login')->with('message', 'Incorrect password, please try again.');
}
Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

mharrisweb mharrisweb Joined 23 Jul 2014

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.