This file contains hidden or 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> | |
| param name='form.csvUrl' default='#getPageContext().getRequest().getScheme()#://#cgi.server_name##getDirectoryFromPath(getPageContext().getRequest().getRequestURI())#users.csv'; | |
| param name='form.group' default='Temp'; | |
| param name='form.isSubmitted' default='false'; | |
| param name='form.isTest' default='true'; | |
| param name='form.siteid' default='default'; | |
| $ = application.serviceFactory.getBean('$').init(form.siteid); | |
| if ( !$.currentUser().isSuperUser() && !$.currentUser().isInGroup('admin') ) { | 
  
    
      This file contains hidden or 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> | |
| // Drop this in your Site or Theme eventHandler.cfc | |
| public any function onBeforeContentSave($) { | |
| // reference to the newBean | |
| var newBean = arguments.$.event('newBean'); | |
| // reference to the original contentBean | |
| var oldBean = arguments.$.event('contentBean'); | |
| // example on how to create some errors | |
| var error = ''; | 
  
    
      This file contains hidden or 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); | 
  
    
      This file contains hidden or 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> | |
| public any function onAfterUserSave($) { | |
| // reference to new user bean | |
| var user = arguments.$.event('userBean'); | |
| // reference to old user bean | |
| //var oldUserBean = arguments.$.getBean('user').loadBy(userid=user.getUserID()); | |
| // reference to content item that will be the parent of the 'User' page | |
| var parentbean = $.getBean('content').loadBy(title='Reps'); |