Skip to main content
February 14, 2009
Question

cflogin doesn't persist

  • February 14, 2009
  • 3 replies
  • 572 views
I use cflogin to login users. When the form submits I login fine and I get the protected page. When I go to the next page I'm asked to login again. Please help.

    This topic has been closed for replies.

    3 replies

    Participating Frequently
    February 25, 2009
    I set the login form to a "log in user" server behavior and code and other pages to "restrict access to page" in DWCS4. This worked for my environment and the persistence was as expected. Hope this helps.
    BKBK
    Community Expert
    Community Expert
    February 16, 2009
    nope. Still doesn't work.
    hmm

    What happens when you modify the code as follows.

    1) Change the username, password field names in the login form to j_username, j_password, respectively. Coldfusion will then automatically create a built-in cflogin structure containing two variables, cflogin.name and cflogin.password.

    2) Use cflogin in the rest of the code

    PS:
    - [typo: cfquery in place of cfqery]
    - corrected the cflogin logic




    BKBK
    Community Expert
    Community Expert
    February 15, 2009
    > When I go to the next page I'm asked to login again.

    Probably because the session breaks when you go from one page to the next. Add the attribute loginStorage="session" to the cfapplication tag.


    February 15, 2009
    nope. Still doesn't work.