> 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.

You mean 2 blocks of cflogin tags? I'd consider that a bug, but also
non-standard usage. There should only be one <cflogin> block per request
(imho).

Just remove the second <cflogin> block.

In my opinion, CF should simply throw an error if two or more blocks are
encountered.

> -- 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.

Yes, it will take more then one role. This works fine in all my tests.
However, do not forget thatit will do an AND check. So if you pass A,B it
will only return true if the user is in both.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to