I'm trying to trace the error and one main thing I find is that if there's 2 CFLOGIN tags on the page, the second one always assumes that your not logged in.

-- begin code --
<cfapplication name="test" sessionmanagement="Yes" loginstorage="Session">
<CFLOGIN applicationtoken="test"></CFLOGIN>

<CFLOGIN applicationtoken="test">
<CFLOGINUSER name="username2" password="password2" roles="admin">
not logged in
<CFABORT>
</cflogin>
logged in
-- end code--
Now my issue was that I was running a CFLOGINUSER within a CFC which was called from within a CFLOGIN block (outside of the CFC) and the CFLOGINUSER was within a CFLOGIN within the CFC. The two CFLOGIN blocks probably interacted. This means that the external CFLOGIN affects the internal CFLOGINUSER. I'll have more info soon.
(the code above is not production, it only showcases an issue).
Also, the IsUserInRole() function will not take more than one role where the docs says that it can take a list.

>Eh? Code inside <cflogin> blocks will NOT run if you are logged in. Do you
>have a firm example that dispproves this? If so please share as it would be
>a bug.
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to