UserEditedEvent and UserChangedEvent (Scriptrunner Custom Listeners)

I’m trying to write a groovy script that would trigger whenever Jira user attributes(name, email etc) are updated/changed using the scriptunner custom listener. I have configured the scriptrunner custom listener to catch the “UserEditedEvent”(from the Events dropdown) and in the groovy script, I have the below code(very basic) to get the user information. I’m seeing that the “UserEditedEvent” is not getting triggered.
Is there any example and/or detailed documentation on UserEditedEvent and UserUpdatedEvent ?

import com.atlassian.jira.user.ApplicationUser
import com.atlassian.jira.user.ApplicationUsers
import com.atlassian.crowd.model.user.User
import com.atlassian.crowd.event.user.UserUpdatedEvent
import com.atlassian.jira.bc.JiraServiceContextImpl
import com.atlassian.jira.security.JiraAuthenticationContext
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.bc.user.search.UserSearchService

UserSearchService userSearchService = ComponentAccessor.getComponent(UserSearchService)
JiraAuthenticationContext jiraAuthenticationContext = ComponentAccessor.getComponent(JiraAuthenticationContext)
def jiraServiceContext = new JiraServiceContextImpl(ComponentAccessor.jiraAuthenticationContext.loggedInUser)

def updateUserEvent = event as UserUpdatedEvent
User updatedCrwdUser = updateUserEvent.getUser()
String crwdTibcoEmail = updatedCrwdUser.getEmailAddress()
ApplicationUser crwdUserName = ApplicationUsers.from(updatedCrwdUser)

ApplicationUser userToBeUpdated = userSearchService.getUserByName(jiraServiceContext, crwdUserName.getUsername())

log.info("UserUpdatedtListener: triggered for " + crwdUserName.getDisplayName())