-
-
Save ronnieduke/35aefc1bc9c815f721e4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
// Place these methods in your Site, Theme, or Plugin's eventHandler.cfc | |
public any function onBeforeUserSave($) { | |
var newUserBean = arguments.$.event('userBean'); | |
var oldUserBean = arguments.$.getBean('user').loadBy(userid=arguments.$.event('userid')); | |
// if you want to stuff the oldUserBean in the event | |
// $.event('oldUserBean', oldUserBean); | |
// here you could run any comparison logic between the oldUserBean and the newUserBean | |
} | |
public any function onBeforeUserUpdate($) { | |
var newUserBean = arguments.$.event('userBean'); | |
var oldUserBean = arguments.$.getBean('user').loadBy(userid=arguments.$.event('userid')); | |
} | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment