Security Login to have access to user data. Easily dynamically alter UI

Is this still the way to do this?


(Since this is 4 years old, I’m just making sure there’s no more modern way.)

If, after entering ID & PW, I have to hit the user table to validate the password, it seems very redundant to go through all these steps just to display the UserName on the page.
Why not add another step in the Security user_login API to save the data I need at that time and be done with it?

In my case, At Login, I want an arbitrary field from the user table stored as some kind of global variable. (user level, first name, whatever)
Lets say I’m displaying a Product List. If a particular user is logged in, I want to display my COST on the page, but all other times HIDE the cost.

Community Page
Last updated: