Replies: 1 comment 1 reply
-
It seems in this case, you would want to use the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When the session is logged in, but the underlying account record has been closed/deleted, on pages that require authentication, we can gracefully handle that by calling
rodauth.require_account
instead ofrodauth.require_authentication
at the beginning of the request.How would we handle that for pages not requiring authentication, which are rendered differently depending on whether the user is logged in our not? Checking for
rodauth.logged_in?
orrodauth.authenticated?
checks just the session, not that the account actually exists. Today I would write it like this in a view template:Or maybe before the request:
Would there be interest in baking this functionality into Rodauth, to make it easier to ensure existence of logged in accounts? I think this would be useful to gracefully handle sessions that are still logged in after the user closed their account, or if a system deletes an account record at part of a maintenance task. I don't know which of these two approaches (checking ad-hoc or before request) would be better; my guess is the latter, since it's more composable, as people don't need to change their
rodauth.logged_in?
androdauth.authenticated?
checks.Beta Was this translation helpful? Give feedback.
All reactions