Assign any callback after user create.
Closed this issue · 1 comments
Merff commented
Hi, thx for good lib.
What is the best way to assign any callback on after create user? I try to change MyApp.Coherence.Schemas functions: create_user(params), but it doesn't work.
Tnx!
smpallen99 commented
In order to use MyApp.Coherence.Schemas
you need to generate controllers for ur project with mix coh.gen.controllers
. Once they are generated and you have updated ur router, that module should be used. You also then have the option of modifying the controllers themselves if you can't get enough functionality from the Schemas module.
Another option is to add a prepare hook in your user schema module. The downside of this approach is that you won't have the id of the user model.