View Complete Thread | FoxWeb Forum Home
Search:
Date:    Msg ID:   
From:    Thread:   
Subject:   
In order to log out and forget password, you must load the exact same values in Auth.AuthTable and Auth.AuthList as you had when the user logged in.  In cases where the user has chosen the "Remember password" option, both the Logout and ForgetPassword methods delete the password cookie from the browser, by sending a new HTTP header command.  The problem in this case is that the Redirect method interferes with the cookie header command, so the cookie is never deleted from the browser.  I believe that your code would work fine if you simply deleted the calls to Response.Redirect.  You will also need to remove the 'logout' and 'bLogout' fields from the QueryString and Post data in order to prevent the Authenticate method from passing them on to the next request.  Here's an updated version of your code:
 
Auth.AuthTable = "user.dbf"
Auth.CancelAction = "history.back();"
Auth.SaveCookie = 2
DO CASE
CASE Request.QueryString("ForgetPassword") = '1'
    **** button Forget Password was pressed
    Request.QueryStringDel("ForgetPassword")
    Auth.ForgetPassword()
CASE Request.QueryString("logout") = '1'
    **** button Logout was pressed
    Request.QueryStringDel("logout")
    Auth.Logout()
ENDCASE
Auth.Authenticate
****... other content ...

FoxWeb Support Team
support@foxweb.com

Sent by Vadim on 05/17/2002 02:01:07 PM:
does not working my LogOut button:
user did check "save password" on login
when user press Logout button it automaticaly login again
 
I try to call ForgetPassword() and Logout() methods, but user still cannot logout
 
I try to redirect (see below) but again no result
what am I doing wrong?
may I need another logout algorithm?
 
 
this part of my survey.fwx
 
Auth.AuthTable = user.dbf
Auth.CancelAction = "history.back();"
Auth.SaveCookie = 2
IF Request.QueryString("logout") = '1'
    Auth.Logout()
    Response.Redirect("survey.fwx")

    **** show the same page for login another userID
    return
ENDIF
 
Auth.Authenticate
IF !empty(Request.form("bLogout"))
   
****    button Logout was pressed
   
Auth.ForgetPassword()
    Response.Redirect("survey.fwx?logout=1")
    return
ENDIF

****... other content ...
 
 
anyone has any ideas?
Vadim