close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Log in twice problem

Thread began 1/31/2012 2:38 pm by bill3786 | Last modified 2/01/2012 10:55 am by Jason Byrnes | 640 views | 5 replies |

bill3786

Log in twice problem

During testing it was possible to log in, add items to the cart and then log in again (no logout) as a different user. After the second log in the contents of the cart from the first log in were still displayed. Is it possible to clear the cart when a user does this?

Sign in to reply to this post

Jason ByrnesWebAssist

you could add an clear cart behavior to the login page and set it to trigger on any form post.

on the server behaviors panel, click the plus button, select eCart -> Cart Display -> Clear Cart

Sign in to reply to this post

bill3786

Tried this but doesn't clear the cart. Tried changing the trigger to Button:LogIn_submit pressed with same result.

Sign in to reply to this post

Jason ByrnesWebAssist

double check to make sure that the clear cart behavior code is before the authenticate user code. If the authenticate user code comes first, it will redirect to the login success page before it can clear the cart.

Sign in to reply to this post

bill3786

I have moved the clear cart behaviour before the code shown below and it works ok. Is this is the correct location for it, if it is, again many thanks.

<?php
if($_SERVER["REQUEST_METHOD"] == "POST"){
$WA_Auth_Parameter = array(
"connection" => $contweedmill,
"database" => $database_contweedmill,
"tableName" => "users",
"columns" => explode($WA_Auth_Separator,"UserEmail".$WA_Auth_Separator."UserPassword"),
"columnValues" => explode($WA_Auth_Separator,"".((isset($_POST["Log_In_group_Email"]))?$_POST["Log_In_group_Email"]:"") ."".$WA_Auth_Separator."".((isset($_POST["Log_In_group_Password"]))?$_POST["Log_In_group_Password"]:"") .""),
"columnTypes" => explode($WA_Auth_Separator,"text".$WA_Auth_Separator."text"),
"sessionColumns" => explode($WA_Auth_Separator,"UserID"),
"sessionNames" => explode($WA_Auth_Separator,"SecurityAssist_UserID"),
"successRedirect" => "login.php?loggedIn=1",
"failRedirect" => "login.php?failedLogin=1",
"gotoPreviousURL" => TRUE,
"keepQueryString" => TRUE
);

WA_AuthenticateUser($WA_Auth_Parameter);
}
?>

Sign in to reply to this post

Jason ByrnesWebAssist

yes, that is correct.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...