Sagewire Logo

CFLOGIN Probem

4 Message(s) by 3 Author(s) originally posted in cfml getting started


From: mletson Date:   Thursday, October 18, 2007
Hello,

I am implimenting a simple login script as such:

<CFIF isLogin.recordCount EQ 1>

<CFLOGINUSER
name = "#form.username#"
password = "#form.password#"
roles = "#isLogin.role#">


<script language="JAVAscript">location.href="index.cfm";</script>

</CFIF>

After a sucessfull login, I then check for the user role which I have verified
to be "admin" using the following script:

<CFIF isUserInRole("admin") EQ true>
Admin
<CFELSE>
Not Admin
</CFIF>

The problem is that the above function never returns "admin". I have verified
many times that the CFLOGINUSER Roles attribute is set to "admin".

Am I missing something?

As always, Thanks


From: GArlington Date:   Friday, October 19, 2007
wrote in message:
Hello,
I am implimenting a simple login script as such:
<CFIF isLogin.recordCount EQ 1>
<CFLOGINUSER
name = "#form.username#"
password= "#form.password#"
roles = "#isLogin.role#">

<script language="JAVAscript">location.href="index.cfm";</script>
</CFIF>
After a sucessfull login, I then check for the user role which I have verified
to be "admin" using the following script:
<CFIF isUserInRole("admin") EQ true>
Admin
<CFELSE>
Not Admin
</CFIF>
The problem is that the above function never returns "admin". I have verified
many times that the CFLOGINUSER Roles attribute is set to "admin".
Am I missing something?
As always, Thanks



Try run ning those and see what the return is:
IsUserLoggedIn(), GetAuthUser(), GetUserRoles(), IsUserInAnyRole()


From: GArlington Date:   Friday, October 19, 2007
wrote in message:
Hello,
I am implimenting a simple login script as such:
<CFIF isLogin.recordCount EQ 1>
<CFLOGINUSER
name = "#form.username#"
password= "#form.password#"
roles = "#isLogin.role#">

<script language="JAVAscript">location.href="index.cfm";</script>
</CFIF>
After a sucessfull login, I then check for the user role which I have verified
to be "admin" using the following script:
<CFIF isUserInRole("admin") EQ true>
Admin
<CFELSE>
Not Admin
</CFIF>
The problem is that the above function never returns "admin". I have verified
many times that the CFLOGINUSER Roles attribute is set to "admin".
Am I missing something?



For the obvious: you are using it like
<CFLOGIN
applicationToken = "token"
cookieDomain = "domain"
idletimeout = "value">

...
<CFLOGINUSER
name = "name"
password = "password"
roles = "roles">

</CFLOGIN>
are not you? I.e. INSIDE <CFLOGIN ...> tag.
As always, Thanks





From: dacf Date:   Tuesday, October 23, 2007
Are you sure that isLogin is a query and returns a row? Are you sure that your
isLogin.role has a value of 'admin'?

My best advice without more code'd be to google Ray Camden and search his
site for CFLOGIN and get one of his examples to run first.



Next Message: CF7 - Questions Regarding Flash Forms


Blogs related to CFLOGIN Probem

Re: Compare two lists and if one element common ...
There are lots of reasons why the cflogin system > was not appropriate for this site, but most was that the CFLOGIN is > too one-size-fits-all for the organisation. > > I have already built the security on this site - it's been in place ...

Flash Remoting Application.cfc & Application.cfm problem
cflogin> my RemoteObjects definitions: ...

RE: Session timeouts with ntauthenticate and cflogin
The problem I am > running into is with session time outs and trying to login from more > than one location. For instance, I have session variables set to > time-out after 1 hour. However, the user stays logged into the system > even ...

cflogin issue
hi, Ive been trying to figure out this problem, but no luck. Whats happening is that im unable to get coldfusion to know the user is logged in. For example, session variables such mm_userauthorization, and mm_username are empty. ...

coldcut music
coldfusion cflogin coldfusion cfloop coldfusion cfloop list coldfusion cfloop query coldfusion cfm coldfusion cfmail coldfusion cfmail attachment coldfusion cfmail attachments coldfusion cfmail tag coldfusion cfmailparam coldfusion cfml ...

cflogin
I can't quite get my head around this problem - I want to allow users open access to pages in a "common" sub-folder, but restricted access (based on roles) to other sub-folders. Users shouldn't be asked to Login until they want ...


Programming | Sports | Autos

copyright 2006
Valid XHTML 1.0 Transitional