<CFLOGINUSER> Tag - ColdFusion
>> Return to ColdFusion Tag Index
The <CFLOGINUSER> tag allows you ...
<CFLOGINUSER> Comments from Macromedia LiveDocs
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p74.htm
Correct. I think the reason for this is that the code within cflogin only executes the first time. That is, once the user is logged in, ColdFusion doesn't go into the cflogin block.
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p74.htm
It seems that GetAuthUser() and IsUserInRoles() work only outside <cflogin>...</cflogin>. You can't use them right after <cfloginuser> before </cflogin>. Is this correct?
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p74.htm
I was incorrect in saying that the password attribute must be a unique string.
The password and name attributes are used together to generate a unique ID.
Therefore, if all name attributes are unique, you can use a value such as the empty string as the cflogin password attribute.
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p74.htm
halL said on Dec 2, 2004 at 1:54 PM :
"The ColdFusion uses the cfloginuser password attribute to generate a unique ID for the user.
The password attribute value does not have to be the user's true password, but must be a string that is unique among all users."
which contradicts the documentation for cflogin:
"A request that uses NTLM or Digest authentication. In this case, the username and password are hashed using a one-way algorithm in the Authorization header; ColdFusion gets the username from the web server and sets the cflogin.password value to the empty string."
So how can an empty string password be unique among all users?
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p74.htm
The ColdFusion uses the cfloginuser password attribute to generate a unique ID for the user.
The password attribute value does not have to be the user's true password, but must be a string that is unique among all users.
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p74.htm
what is the password attribute for ?!!
I user the user name and password to validate the user by a database, If it was valid then I run cfloginuser tag to login the user. What does cfloginuser need the password for?
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p74.htm
What is the max length of the roles parameter? It seems to fails if there are too many roles...
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p74.htm
sorry, both require the <cflogin> tag...
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p74.htm
It should also be noted, the basics:
1) getAuthUser() requires the cflogin.
Calls: <cflogin><cfoutput>#GetAuthUser()#</cfoutput>
2) Roles: Does not require <cflogin>. (Below is just a summary of Space sensitive already mentioned). Different roles are seporated by commas, but should not have spaces after the commas; otherwise, the space is required for testing it, for the space is included in that role name.
Calls: <cfif IsUserInRole("[role,role...]")> or <cffunction name="ex" roles="[role,role...]">
Ex: <cfif IsUserInRole("admin,webdept")>do something...</cfif>
?- My question is if by default its in the session scope should calls to be it use the cflock (Readonly for verification tests, and Exclusive for setting)?
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p74.htm
Its worth mentioning that when checking for multiple roles,
isUserInRole checks for role1 AND role2 AND role3 etc, not OR
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p74.htm
I can use the getAuthUser() and IsUserInRole(roles) to get the username and to check whether the user is a member of a particular role.
But.. I need to get the entire list of roles that a logged in user is a member of. There ought to have been a function called getAuthUserRoles() for this, but there isn't. The list of roles is stored in server memory - how can I retrieve that list??
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p74.htm
Yes, you can use cfloginuser outside of cflogin, but it it only applies for the life of the request: See http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/appsec11.htm#wp1139097 for more information
You can use cookie scope or session scope to maintain login information. See http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/appsec10.htm for more information.
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p74.htm
can <cfloginuser> be used outside of <cflogin> block?
If browser does not enable memory-only cookie, <cflogin> get work or not? (before and after mx6.1)?
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p74.htm
The example is on the cflogin page.
To see it, click the left-arrow at the top or bottom of the page, or the text link near the bottom of the text on this page.
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p74.htm
Where is the example? It should be great to have some example, particularly cause this is a new tag...
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p74.htm
You are correct. It should say cflogout.
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-p74.htm
"the login remains in effect until the session expires or the user is logged out by the cflogin tag"
I am confused how the user is logged out by the cflogin tag? is it supposed to be the cflogout tag?
[Top]
Recommended Books
COLDFUSION MX Web Application Construction Kit (5th Edition)
Authors: Ben Forta and Nate Weiss
1500 pages
[Top]
Web Sites
Macromedia
The makers of ColdFusion/ColdFusion MX.
ColdFusion Developer's Journal
Forta.com (ColdFusion Section)
Ben Forta is Macromedia's Senior Technical Evangelist. Here on his site find useful ColdFusion information.
Flash CFM
Flash and ColdFusion Development.
Handling file uploads without CFFILE
BLOG post by "Sam" on REWINDLIFE.COM gives insight into how to upload a file on your site if you are not allowed to use the CFFILE tag.
[Top]
Copyright © 2003- 2008, Orville Paul Chomer, All Rights Reserved
Home Page
Blog
How To
Chomer TV
The Show
Webcam Videos
Freeware
•
VB Mahjongg
Coding
•
ColdFusion
•
Javascript
•
Visual Basic
Other Places
Acoustic Eidolon
History Singers
Scobleizer
Beach Walks
Freshtopia
CSS Zen Garden