SELECT * FROM logininfo WHERE userid = '#cflogin.name#' AND password = '#cflogin.password#' [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => Boiler2005 [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 5 [islastshown] => 1 [isfirstshown] => [attachments] => [allattachments] => ) --> cflogin problem - Coldfusion - Advanced Techniques

cflogin problem - Coldfusion - Advanced Techniques

I am using coldfusion authentication architecture to get the users logged in to my system. Authentication is working ok but it is giving me problems when user doesn't properly logout. Steps are 1. User logs in 2. User closes the browser without logging out. 3. User opens new browser and tries to login again. 4. This time when user logs in, the body part of "cflogin" tag is not executed.(which I checked by displaying a message from within body part of cflogin tag.) I know that the body part of ?cflogin" tag is only executed if user is not logged ...

  1. #1

    Default cflogin problem

    I am using coldfusion authentication architecture to get the users logged in
    to my system.
    Authentication is working ok but it is giving me problems when user doesn't
    properly logout.

    Steps are
    1. User logs in
    2. User closes the browser without logging out.
    3. User opens new browser and tries to login again.
    4. This time when user logs in, the body part of "cflogin" tag is not
    executed.(which I checked by displaying a message from within body part of
    cflogin tag.)

    I know that the body part of ?cflogin" tag is only executed if user is not
    logged in but I guess it should be executed if sessionid is different for newly
    opened browser in about scenario.. right?. I checked the session id and it is
    different for each new browser that is opened.

    I am using cookie as login storage. I don?t know what happens to the stored
    login information if browser is closed without logging out. But next time user
    logs in cflogin tag should be executed to get the user authenticated in my view.

    Can any body help me with this problem?


    prabin_sh Guest

  2. #2

    Default Re: cflogin problem

    When do you set the cookie to expire?
    tjfrevert Guest

  3. #3

    Default Re: cflogin problem

    hi TJF,

    i haven't set any cookie expiry time.

    but to generate unique session id for each browser i have used following code

    <cflock timeout="30" type="exclusive">
    <cfif IsDefined("Session.CFID") and IsDefined("Session.CFTOKEN")>
    <cfcookie name="CFID" value="#session.CFID#">
    <cfcookie name="CFTOKEN" value="#session.CFTOKEN#">
    </cfif>
    </cflock>

    also i have set client storage to registry. Does it make any difference...

    prabin_sh Guest

  4. #4

    Default CFLOGIN Problem

    Hello... For the application I am currently dev. I am using CFLOGIN.
    When a user navigates to the site it directs them to login.cfm where they
    enter their Username and Password. Everything is working fine except for some
    reason CF is requiring the use to login 2 times, twice, and then allow the site
    to function. Any ideas? Thank you in advance.
    /// I have pasted my application.cfm below.

    Boiler2005 Guest

  5. #5

    Default Re: CFLOGIN Problem

    <cfapplication name="GetLeadApp" clientmanagement="no" sessionmanagement="yes"
    setclientcookies="no" setdomaincookies="no" sessiontimeout="20" >
    <cfparam name="session.sessionDate" default="#Now()#" type="date">


    <!--- Logout --->
    <cfif IsDefined("Form.logout")>
    <cflogout>
    </cfif>


    <!--- Login --->
    <cflogin>
    <cfif NOT IsDefined("cflogin")>
    <cfinclude template="login.cfm">
    <cfabort>
    <cfelse>
    <cfif cflogin.name IS "" OR cflogin.password IS "">
    <CFSET login_status = "empty">
    <cfinclude template="login.cfm">
    <cfabort>
    <cfelse>
    <CFQUERY NAME="loginQuery" DATASOURCE="#APPLICATION.Datasource#"
    username="#username#" password="#password#">
    SELECT *
    FROM logininfo
    WHERE
    userid = '#cflogin.name#'
    AND password = '#cflogin.password#'
    </cfquery>
    <cfif loginQuery.Roles NEQ "">
    <cfloginuser name="#cflogin.name#" Password =
    "#cflogin.password#" roles="#loginQuery.roles#">

    <cfelse>
    <CFSET login_status = "invalid">
    <cfinclude template="login.cfm">
    <cfabort>
    </cfif>
    </cfif>
    </cfif>
    </cflogin>

    Boiler2005 Guest

Similar Threads

  1. cflogin
    By Mattastic in forum Macromedia ColdFusion
    Replies: 5
    Last Post: August 11th, 10:09 AM
  2. Using <cflogin>
    By ckainc in forum Coldfusion - Getting Started
    Replies: 1
    Last Post: June 22nd, 01:35 PM
  3. Doesn't ANYBODY know anything about cflogin???
    By nckgb in forum Coldfusion - Getting Started
    Replies: 8
    Last Post: March 24th, 06:51 PM
  4. cflogin confusion
    By nckgb in forum Macromedia ColdFusion
    Replies: 2
    Last Post: March 18th, 07:08 PM
  5. cflogin HELP
    By nckgb in forum Coldfusion - Getting Started
    Replies: 0
    Last Post: March 15th, 03:00 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •