-
Notifications
You must be signed in to change notification settings - Fork 11
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 plugin hooks before and after the kirby user gets logged in #34
base: release-3.1.0
Are you sure you want to change the base?
Conversation
Thanks for your pull request. I would prefer to have the second parameter of the hook require a I would also move the before hook before the whole gate logic starting here so it's possible to prevent user creation with the hook. |
So, for my understanding: You suggest the before hook in front of line 148 to make it possible to prevent user creation? Or do we need to put that hook inside the If-clause to only trigger when the user does not exist (in this case, before line 149)? This hook would not be a Something like: Do you agree, or did I misunderstand something? |
Sorry for my late reply, I’ve been on vacation.
Yes you’re right.
Then i would go with:
and
|
…write or stop the user creation. Added thathoff.oauth.user-create:after-hook
Same here, sorry.
Yes, the changes should be implemented. The only thing left to do is change the version in composer.json (I guess this will be 3.1.0?) but i think this is up to you @thathoff Tell me if you want other changes in this PullRequest or if you are fine with what we got now @thathoff |
Thank you! I’ll check everything and maybe include this feature right into the next release. |
Added hooks before and after the kirby user gets logged in.
This was suggested in #30 (comment)
An example use-case is to process the given roles in the oAuthUserData to assign kirby roles.
It would be nice if something like this could be added to the plugin. Feel free to change anything.