-
Notifications
You must be signed in to change notification settings - Fork 13
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
added event for creating a user #54
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -215,6 +217,8 @@ def rememberIdentity(self, userinfo): | |||
# https://bandit.readthedocs.io/en/1.7.4/plugins/b110_try_except_pass.html | |||
pass | |||
self._updateUserProperties(user, userinfo) | |||
if user is not None: | |||
notify(PrincipalCreated(user)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is notifying this enough? For instance, when a user logs in a Plone site and Plone fires portal_membership's loginUser
, this tool notifies either UserInitialLoginEvent
or UserLoggedInEvent
.
I think that we should be notifying those two events too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I see it correctly, it can also happen that member properties have to be updated with every new login. From this point of view, it definitely makes sense to notifying more events.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch indeed.
As this PR seems stale, and @steffenri has a deadline to respect, I created a new PR #58 including the implementation here and the additional events requested by @erral |
explained in #53