Support the ongoing development of Laravel.io →
Authentication Session Eloquent
Last updated 3 months ago.
0

Just tested on a fresh install of 4.2. Both var_dumps echo null for me. Your question needs more context (likely some more code) to be able to be resolved.

Last updated 3 months ago.
0

There might be an active session causing this. Try running Auth::logout(); before creating the user.

Last updated 3 months ago.
0

AntonNiklasson said:

There might be an active session causing this. Try running Auth::logout(); before creating the user.

Hmmm I have a feeling you are right here because I dont check the Auth state when doing a registration (ye I know I should). Ill redirect the login and registration page if a user is logged in and tell them to log out first. Ill also make sure on a new registration I run the Auth::logout() as a safety catch. This solution makes sense so ill investigate and mark as solution if its correct :)

Last updated 3 months ago.
0

Sign in to participate in this thread!

LoadForge

Your banner here too?

Wancieho Wancieho wancieho Joined 17 Apr 2014

Moderators

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

Your logo here?

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

© 2022 Laravel.io - All rights reserved.