Replies: 1 comment 1 reply
-
You could have the Rodauth hooks create a model and call the appropriate method on it. However, this may work in your Rodauth config and be simpler: new_account do
super.merge!(settings: Account::DEFAULT_SETTINGS)
end |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys,
I was wondering how to execute defined model hooks when creating the account. Currently, I have this hook
I understand that
rodauth
doesn't use the model but I'm curious how to execute the above hooks after the account was created.Can change the above hook to
before_save
and check if the settings are already set, but I'm curious where is a good place to do this after the account was created. Thinking to use theafter_create_account
rodauth hook and save it again, but I'm curious if there is a better way, how you do such things ? :)Beta Was this translation helpful? Give feedback.
All reactions