Handler for User Updated or Created?

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.

This forum is for discussing mojoPortal development

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.

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.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
3/4/2010 1:31:53 PM
Gravatar
Total Posts 35

Handler for User Updated or Created?

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.

3/4/2010 1:38:32 PM
Gravatar
Total Posts 18439

Re: Handler for User Updated or Created?

We don't currently have an extension point for user updated, but we do have one for user created aka user registered.

http://www.mojoportal.com/user-registered-event-handlers.aspx

I've made a note to look into adding a similar extension point for user update.

Best,

Joe

3/4/2010 1:40:27 PM
Gravatar
Total Posts 35

Re: Handler for User Updated or Created?

Would the user registered event be fired if an Admin went in and created the user?

3/4/2010 1:44:51 PM
Gravatar
Total Posts 18439

Re: Handler for User Updated or Created?

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.

Best,

Joe

3/4/2010 3:52:41 PM
Gravatar
Total Posts 35

Re: Handler for User Updated or Created?

HI Joe,

 

  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?

3/4/2010 4:09:44 PM
Gravatar
Total Posts 35

Re: Handler for User Updated or Created?

Nevermind, I got it.

 

Thanks

3/5/2010 6:52:07 AM
Gravatar
Total Posts 18439

Re: Handler for User Updated or Created?

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.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.