Skip to content
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

ICredentialsUpdatedEvent event handler incorrectly calls updateCredentials #59

Closed
ericof opened this issue Nov 27, 2019 · 0 comments · Fixed by #60
Closed

ICredentialsUpdatedEvent event handler incorrectly calls updateCredentials #59

ericof opened this issue Nov 27, 2019 · 0 comments · Fixed by #60
Labels

Comments

@ericof
Copy link
Member

ericof commented Nov 27, 2019

Products.PluggableAuthService.events.userCredentialsUpdatedHandler calls updateCredentials explicitly passing the principal object.

@adapter(IBasicUser, ICredentialsUpdatedEvent)
def userCredentialsUpdatedHandler(principal, event):
    pas = aq_parent(principal)
    pas.updateCredentials(
            pas,
            pas.REQUEST,
            pas.REQUEST.RESPONSE,
            principal.getId(),
            event.password)

As pas in here is an instance, updateCredentials already receives self implicitly -- no need to provide it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant