-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
userBean
not defined if logged-in user is not found
#20
Comments
I think I was dealing with the same scenario:
Are you suggesting that the |
Or handle it immediately after the
Agreed.
I'm not sure that is expected behavior. While the docs do not explicitly say so, I assumed all I tend to think a |
AuthenticationService's
getUser()
method should be able to handle anull
response from the user service.https://github.com/coldbox-modules/cbauth/blob/main/models/AuthenticationService.cfc#L152-L163 - it seems
getUser()
expectsgetUserService().retrieveUserById(...)
to throw an error if the user cannot be found.Instead, I'd prefer to handle
null
's as a missing user, and logout or clear the session val.The context of this is that a logged-in user was deleted. (don't ask!)
I would be happy to PR something like this to
AuthenticationService.cfc
'sgetUser()
method:The text was updated successfully, but these errors were encountered: