Login / Logout

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.
User avatar
alex4orly
 
 
Posts: 666
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Login / Logout

Post by alex4orly » Thu Apr 27, 2017 10:33 pm

Following up on several postings on the topic, I am still not seeing a resolution.
So I created two php pages - please see this url : http://www.nmaa-rc.org.au/entry.php

1) an entry page : entry.php, it has on it a Page protect object and the password is 12345
2) If successful, it has a redirection to a page called target.php
3) The target.php page has an image and a Logout object - the php code generated is the following code, clearly showing that I want it to go to the Page protect password object, instead - it goes back into the target.php page instead of logging out...

Pablo, this has no DBTS CSV List extension - it is all WWB code without any manual intervention

So, please tell me, what am I doing wrong here?
Thanks

<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['form_name']) && $_POST['form_name'] == 'logoutform')
{
if (session_id() == "")
{
session_start();
}
unset($_SESSION['username']);
unset($_SESSION['fullname']);
header('Location: ./entry.php');
exit;
}
?>

maxime
 
 
Posts: 325
Joined: Sat Apr 02, 2011 6:15 pm
Contact:

Re: Login / Logout

Post by maxime » Thu Apr 27, 2017 11:08 pm

i think you should use this code instead

<?php
if (session_id() == "")
{
session_start();
}
unset($_SESSION['username']);
unset($_SESSION['password']);
header('Location: ./entry.php');
?>

User avatar
alex4orly
 
 
Posts: 666
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Login / Logout

Post by alex4orly » Thu Apr 27, 2017 11:41 pm

Dear Maxime,

I am trying to make a point about WWB and wait for Pablo to answer.
If there are objects in WWB that are expected to be working a certain way, it will not be right for me to try and manipulate it to fix.

Thanks again for your help
Cheers

User avatar
bburgess
 
 
Posts: 294
Joined: Mon May 13, 2013 5:05 am
Location: Australia
Contact:

Re: Login / Logout

Post by bburgess » Fri Apr 28, 2017 1:24 am

@alex4orly mate I am learning from your posts and the reply's!

I have been having some issues as well so this is great that questions are asked and I can look them up :)

Cheers
BB

User avatar
Pablo
 
Posts: 16809
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Login / Logout

Post by Pablo » Fri Apr 28, 2017 6:58 am

As you can see, the code is correct.
So the problem may be in one of the other pages.
To be able to help you I need to see the code of all pages.

User avatar
Pablo
 
Posts: 16809
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Login / Logout

Post by Pablo » Fri Apr 28, 2017 8:57 am

The problem is that you have used the 'single page protect' object to protect the page.
The 'single page protect' object is meant to be used as standalone solution. It does not use a database and uses a different session variable ($_SESSION['password'] vs $_SESSION['username'], see the code). it should not be mixed with the other login tools, it's a stand alone object (see the help).

So logout will not do anything in this case because it resets the 'username' variable.

User avatar
alex4orly
 
 
Posts: 666
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Login / Logout

Post by alex4orly » Fri Apr 28, 2017 9:11 am

I see, so in a multi page project - how do I protect a specific page?

User avatar
Pablo
 
Posts: 16809
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Login / Logout

Post by Pablo » Fri Apr 28, 2017 9:19 am

In that case you will need to use the 'protected page' object.

Related tutorial:
http://wysiwygwebbuilder.com/login_basics.html

User avatar
alex4orly
 
 
Posts: 666
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Login / Logout

Post by alex4orly » Fri Apr 28, 2017 9:46 am

The main problem I have here is that I have a single point of entry for the Admin functions
Please have a look here : http://www.nmaa-rc.org.au/
At the bottom of the page on the left the button - click on it and you see TWO objects

1) The Admin object
2) A button to access the page where the DBTS CSV List object is

Logically, I would have liked to be able to make this button visible only AFTER - the Initial Admin is logged into the object
I tried all sorts of ideas but can't seem to make it.

If I could do that, I would not need at all to protect the page and once the Admin logs out - the Dataviewer will also be hidden

Any suggestions?

User avatar
Pablo
 
Posts: 16809
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Login / Logout

Post by Pablo » Fri Apr 28, 2017 10:16 am

The admin section and the protected pages are two different levels.

The login of the admin prevent normal users from accessing the admin tools.
The normal login prevents anyone from accessing the protected page.
Normally the visitor and the admin are two different people.

If you wish to use the same password for the admin and the protected page then you will need to modify the scripts.

User avatar
alex4orly
 
 
Posts: 666
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Login / Logout

Post by alex4orly » Fri Apr 28, 2017 8:40 pm

I am talking here about the duties of an Admin person
He / she is the one to maintain the members database
He / She is the one to see a list / report of the database
The two functions are tightly related, it is NOT two different people

All that I want, is to be able to place a button on the page AFTER the admin logs in, what this button does is not the point here
It seems to me to be very simple to add this functionality to the Admin object, I mean - "Simple" for someone who knows how to do it, even more simple to the designer of this module.

I wonder, am I the first / only one who has ever asked for such thing?

With the current scenario, the admin is required to log in twice on the same page, this is NOT a nice option

Cheers

User avatar
Navaldesign
 
 
Posts: 1169
Joined: Sat Mar 01, 2008 8:08 pm
Location: Italy
Contact:

Re: Login / Logout

Post by Navaldesign » Fri Apr 28, 2017 9:17 pm

But, if all of the above are only for the Administrator to see, why don't you simply place all the pages / files in a protected folder ?
A protected folder can be setup directly in your hosting account control panel, and the Admin can simply login once and do all he has to do.
www.dbtechnosystems.com

User avatar
alex4orly
 
 
Posts: 666
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Login / Logout

Post by alex4orly » Fri Apr 28, 2017 9:57 pm

George
I am talking about the interface....
The admin module has a front login, it would make sense to that once the admin person logs in, he is the only one who can access the relevant objects.
Otherwise he needs to log in twice
What for?
Protecting it kn a folder will not change this.
Can the admin object be set without the login step?
If i could. I wkuld have placed it + the dbts report under one skngle protected page with a single login
Cheers

User avatar
alex4orly
 
 
Posts: 666
Joined: Mon Jan 20, 2014 8:17 am
Location: Australia
Contact:

Re: Login / Logout

Post by alex4orly » Fri Apr 28, 2017 10:52 pm

One more thing, the same membership database is used for club members to log into their functions, if I was to hide it in a protected folder, they will be locked out. Please have a look here : http://www.nmaa-rc.org.au/

At the bottom of the page on the left the button - click on it and you see TWO objects

1) The Admin object - to access this, the admin needs to LOGIN, is there a way to avoid this step?
2) A button to access the page where the DBTS CSV List object is, the Admin guy needs to log in again...

Logically, I would have liked to be able to make this button visible only AFTER - the Initial Admin is logged into the object
I tried all sorts of ideas but can't seem to make it. Alternatively, be able to pass the Login stage of item #1 above

I will be happy to go with either option, if someone tells me how....

Cheers

User avatar
Pablo
 
Posts: 16809
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Login / Logout

Post by Pablo » Sat Apr 29, 2017 6:59 am

I wonder, am I the first / only one who has ever asked for such thing?
Yes, you are the first user who has asked this.

I'm sorry at the moment this is how it works.
I think what you want is very specific ,so you will need to make the modifications yourself.

Please understand that these tools were designed as a basic login system. This is not a solution that can be used for any possible scenario you can think of. There is no way to design a script that will do that.
There is always someone that want is to behave slightly different. No matter how hard I do my best, there are sometime users I have to disappoint.
But if you have suggestions for future development then I will consider it for later updates.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests