Created
June 26, 2017 22:48
-
-
Save sigmaprojects/7778578f200b796d58947e7f1d0eb207 to your computer and use it in GitHub Desktop.
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
component extends="coldbox.system.EventHandler" { | |
function preHandler(event,rc,prc) { | |
if ( getInstance("cookieStorage@cbstorages").exists("user") and rc.event neq "user.logout") { | |
event.setValue('isLoggedIn',1); | |
event.setValue('user',getInstance("cookieStorage@cbstorages").getVar("user")); | |
} else { | |
event.setValue('isLoggedIn',0); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment