close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Where's the log out function?

Thread began 6/28/2010 5:22 am by mrs | Last modified 9/02/2010 6:29 pm by Jason Byrnes | 1401 views | 9 replies |

mrs

Where's the log out function?

I have used security assist to create a registration, log in etc, and once the user is logged in I have created on a every page of my website an area that shows one region and hides another by using the security assist show region function based on whether the user is logged in to the users db table, and it works a treat.

I am now trying to add a log out function, but don't know how to do that as it doesn't exist as a security assist choice, so how do I get a user logged out?

Thanks

Sign in to reply to this post

Jason ByrnesWebAssist

Logout uses the Cookies toolkit Clear Session server behavior.


On the logout page, click the plus button on the server behaviors panel and select WA Cookies Toolkit -> Clear Session.


Set the trigger to Before Page Load and set it to clear all.

Sign in to reply to this post

mrs

OK, so I have downloaded the latest version of cookies toolkit and installed it, but I have just received a javascript error when trying to run it!

While executing onLoad in WACT_ClearSession.htm, the following Javascript error(s) occured:

At line 357 of file "Hard Disk... blah blah ...Shared:Webassit:Cookies:Library:WA_Configuration.js": getTagProp is not defined

I have removed the MacCaheFile.dat and rebooted DW, but nothing has changed. I have read that if a problem persists, then I need uninstall and reinstall, but that is going to take me hours yet again! Is that seriously what I have to consider doing? It takes an age to uninstall, and just as long to reinstall. I have never had this sort of problem with other extension from other vendors, so why does this kind of error always present itself with nothing but a webassist product?

I don't currently have time to uninstall and reinstall, so I am wondering if you could paste the code I need here. I have used a table called tbl_users from a db called evo1. The unique field and username filed is called fld_email, and the password filed is called fld_password.

Hope you can help and sort this code out for me!

Sign in to reply to this post

Jason ByrnesWebAssist

This error appears to be a conflict with another extension installed.

We are investigating where the conflict is and trying to resolve it.


You can use the following code to destroy the session:

php:
<?php

// Initialize the session.
// If you are using session_name("something"), don't forget it now!
session_start();

// Unset all of the session variables.
$_SESSION = array();

// If it's desired to kill the session, also delete the session cookie.
// Note: This will destroy the session, and not just the session data!
if (ini_get("session.use_cookies")) {
    
$params session_get_cookie_params();
    
setcookie(session_name(), ''time() - 42000,
        
$params["path"], $params["domain"],
        
$params["secure"], $params["httponly"]
    );
}

// Finally, destroy the session.
session_destroy();
?>
Sign in to reply to this post

Steve

Error still present

Ran into the same error today.. Latest version extension and also cleared .dat file

Sign in to reply to this post

Jason ByrnesWebAssist

we have isolated the conflict to security assist and will be releasing an update to fix the issue.

In the mean time, you can disable security assist in the extensions manager when you need to use the unset session variable behavior.

Sign in to reply to this post

carleneBeta Tester

Jason -could you perhaps post a bug report sticky on this forum about conflict?

I was just about to set the log out page up as well. Will that code that you posted work as is - or is there some line(s) that need to be customized in it?

And does this bug affect any other usages of Security Assist and the Cookies Toolkit? Like in the "Remember Me" and "Stay Logged in" checkbox functionality?

And what about when one attempts to combine Security Assist, Universal Email and the CSS Form Builder validations?

Just seeking more clarification on the nature of the conflicts.

Many Thanks!

Sign in to reply to this post

Jason ByrnesWebAssist

the conflict only effects the clear session value server behavior.

if you create the logout using the wizard, there is no issue.


the conflict does not effect any other aspects of security assist assist.


the only time you will encounter a problem is using the Clear session Value server behavior from the server behaviors panel or the insert menu.


the code i posted earlier will completely destroy the session and does not need to be modified.

Sign in to reply to this post

carleneBeta Tester

Great thanks so much for the clarification!

Sign in to reply to this post

Jason ByrnesWebAssist

no worries

Sign in to reply to this post
loading

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...