imports/vx/server/code/vxapp.js
/**
     * Generate events and notifications when a user logs in.
     *
     * @param {string} userId User ID.
     */
Generate events and notifications when a user logs in.
@param {string} userId User ID.
Generate events and notifications when a user logs in . @param { string } userId User ID .
onLogin(userId) {
        if (!userId) {
            return
        }
        OLog.debug(`vxapp.js onLogin email=${Util.getUserEmail(userId)}`)
        const domainId = Util.getCurrentDomainId(userId)
        const eventData = { userId: userId, email: Util.getUserEmail(userId) }
        if (VXApp.isRecentEvent("USER_LOGIN", domainId, userId, 3600)) {
            return
        }
        VXApp.createEvent("USER_LOGIN", domainId, eventData, { userName: Util.fetchFullName(userId) } )
    }
onLogin ( userId ) { if ( ! userId ) { return } OLog . debug ( ` ${ Util . getUserEmail ( userId ) } ` ) const domainId = Util . getCurrentDomainId ( userId ) const eventData = { userId : userId , email : Util . getUserEmail ( userId ) } if ( VXApp . isRecentEvent ( "USER_LOGIN" , domainId , userId , 3600 ) ) { return } VXApp . createEvent ( "USER_LOGIN" , domainId , eventData , { userName : Util . fetchFullName ( userId ) } ) }
Generate events and notifications when a user logs in.
Generate events and notifications when a user logs in .