This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.
Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.
Before posting questions here you might want to review the developer documentation.
I'm trying to fire some code whenever a user is updated or created. I could put it in the stored procedures, but I'd like to see if there is a better way.
We don't currently have an extension point for user updated, but we do have one for user created aka user registered.
I've made a note to look into adding a similar extension point for user update.
Would the user registered event be fired if an Admin went in and created the user?
I just looked at the code and I see that no it does not fire the event from the admin side currently, that will be easy enough to add, I will put it on my to do list so I don't forget.
I tried adding an EXEC myproc_sp to the end of the mp_Users_Update, but then the update broke.
I know its not the best solution, but is there a way to allow me to do this?
Nevermind, I got it.
A little better solution might be to create an insert trigger and an update trigger on the table and put your logic there. This way your logic would not be lost if the stored proc gets updated by an upgrade script. Be careful though if your logic is updating the mp_Users table it would recursively fire the trigger. As long as your logic doesn't touch the mp_Users table a trigger seems like a better idea to me.