Does creating an account in the console trigger before_create_account
hook?
#277
Answered
by
janko
whysthatso
asked this question in
Q&A
-
Account.create email: "email@example.com" etc... only creates the account, successfully, but does not seem to call that hook. |
Beta Was this translation helpful? Give feedback.
Answered by
janko
Feb 15, 2024
Replies: 2 comments
-
It doesn't. It skips the account creation lifecycle, and only uses Rodauth to hash the password. If you want the hook to be called, you should use the RodauthApp.rodauth.create_account(login: "email@example.com", password: "secret123") |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
whysthatso
-
dude, you're too fast :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It doesn't. It skips the account creation lifecycle, and only uses Rodauth to hash the password. If you want the hook to be called, you should use the
internal_request
feature, concretely thecreate_account
class method it provides.