Logout object

Issues related to the Login tools of WYSIWYG Web Builder.
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/login_basics.html
http://www.wysiwygwebbuilder.com/login_tools.html

TIP:
A lot of information about the login tools can be found in the help/manual.
Also checkout the demo template that is include with the software.
Post Reply
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Logout object

Post by alex4orly »

Tried now to use the Logout Object.

I have a PHP page with the DBTS CSV List object by Navaldesign. The report works fine, but I am protecting the page with the Page Protect object and I want users to click the Logout button to get out when they finish viewing the report.

When they click the logout button, it takes them out from the report back to be presented with the Password page protect form, it doesn't!
I redirected it to the previous page, but if a user clicks to get back to the report, they can get in without the need to go through the password screen

Any idea?
User avatar
Pablo
 
Posts: 21571
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Logout object

Post by Pablo »

Maybe there is invalid code at the start of the page?

Note that logout is nothing more than clearing the session variable.
User avatar
alex4orly
 
 
Posts: 632
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Logout object

Post by alex4orly »

I didn't add any manual code to the page
Maybe the problem is that I added the Logout object onto the bottom of the same page where the DBTS CSV List object is located

If that is allowed, then I don't know what else to do
User avatar
Pablo
 
Posts: 21571
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Logout object

Post by Pablo »

I do not know what code is generated the 'DBTS CSV List' object'.
But there may be a conflict in the code.
User avatar
Navaldesign
 
 
Posts: 862
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Re: Logout object

Post by Navaldesign »

You should NOT use the Page Protect object. The DBTS CSV list already allows you to set protection ( B. Page Accessibility, -> >Allowed Access -> 2. Logged users).

You can NOT use the logout object in the same page as the "logout" object code destroys the session and the user will not be able to view the list.
You can use a button to link to another page and place the following code in the Start of Page of this other page:

<?php

if (session_id() == "")
{
session_start();
}
unset($_SESSION['username']);
unset($_SESSION['password']);
header ("Location: redirectpage.php");
exit;

?>

where redirectpage.php (or whatever else) is the page where you want to redirect after logging out.
www.dbtechnosystems.com
Post Reply