Perl-Evozon / PearlBee

116 stars 44 forks source link

User data created in session at login-time #45

Open xsawyerx opened 8 years ago

xsawyerx commented 8 years ago

When logging in, we generate session data for the user. If an administrator changes anything in the user data while the user is logged in, this doesn't get recalculated. The user will have to log out and log in again in order to see what changed.

Instead, only the user ID should be stored, and the user data should be fetched at a before hook. This allows the data to be fresh whenever a route needs to check it or render a template that needs to check it.

Another solution is have every call that changes that data to refresh it, but that's much more work with no gain really.

I tried doing this but had some problems which means I might need to solve #44 first.

xsawyerx commented 8 years ago

This is resolved in my fork.