Members Only Pages

All WYSIWYG Web Builder support issues that are not covered in the forums below.
Forum rules
IMPORTANT NOTE!!

DO YOU HAVE A QUESTION OR PROBLEM AND WANT QUICK HELP?
THEN PLEASE SHARE A "DEMO" PROJECT.



PLEASE READ THE FORUM RULES BEFORE YOU POST:
http://www.wysiwygwebbuilder.com/forum/viewtopic.php?f=12&t=1901

MUST READ:
http://www.wysiwygwebbuilder.com/getting_started.html
WYSIWYG Web Builder FAQ
Post Reply
Nolly
 
 
Posts: 9
Joined: Fri Sep 11, 2020 8:47 pm
Location: U.K.
Contact:

Members Only Pages

Post by Nolly »

I have made a members login page on my website, but am unable to understand how to get members to be able to sign into different pages within the site.
The problem I have found is in the login structure it askes for the destination page, which I have found is the same for all the members who wish to sign in. even though they should not be going into that particular page.

To make life easy for the members of a group and there are 12 in each group, of which I have six groups at present, is to give each group a designated user name for each group and password.

I have the following:-

Members Login which I want to be able to access one of the following pages for each of a group of members.
CZ1
CZ2
CZ3
etc. with members of CZ1 only allowed to access the CZ1 page and members of CZ2 only allowed access to CZ2's page etc.

Completely stumped on how to archive this, I have read all the advice but can't fathom it out.

Can any one talk me through the procedure.
User avatar
Pablo
 
Posts: 23475
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Members Only Pages

Post by Pablo »

On the destination page you can place a 'user redirect' object. There you can redirect each user to their own page.
Nolly
 
 
Posts: 9
Joined: Fri Sep 11, 2020 8:47 pm
Location: U.K.
Contact:

Re: Members Only Pages

Post by Nolly »

Hi Peblo,
I have tried to follow the instructions of creating login's for members to access different pages within my site. I have managed to sort on login for members to get to one set of pages but am unable to understand how I can get a different set of members to login to their pages.
Every time I set up a new user it always sends them to the other groups page.
I really need someone to walk me through the whole set up.
You answered me before when I asked, with:- "On the destination page you can place a 'user redirect' object. There you can redirect each user to their own page".
But I'm not sure how to do that.

My previous question " I have made a members login page on my website, but am unable to understand how to get members to be able to sign into different pages within the site.
The problem I have found is in the login structure it askes for the destination page, which I have found is the same for all the members who wish to sign in. even though they should not be going into that particular page.

To make life easy for the members of a group and there are 12 in each group, of which I have six groups at present, is to give each group a designated user name for each group and password.

I have the following:-

Members Login which I want to be able to access one of the following pages for each of a group of members.
CZ1
CZ2
CZ3
etc. with members of CZ1 only allowed to access the CZ1 page and members of CZ2 only allowed access to CZ2's page etc.
I am at the moment stuck and can't progress. Can you help please?
User avatar
BaconFries
 
 
Posts: 5948
Joined: Thu Aug 16, 2007 7:32 pm

Re: Members Only Pages

Post by BaconFries »

Did you read Pablo's reply to you about this
You can use 'user roles' to create groups
https://www.wysiwygwebbuilder.com/forum ... 60#p456060
User avatar
Pablo
 
Posts: 23475
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Members Only Pages

Post by Pablo »

I assume you have used 'user roles'?

Here are some ideas:
1.
On the 'destination page' of the login object, place a 'protected page' object, set the user role to 'Admin'
Set the 'access denied' property to another page with a different user role, set the user role to 'Member'
etc

2.
On the 'destination page' show links to the different groups, although the user can select any group, he can only visit the one he has access to.

3.
Alternatively, you can write you own script where you redirect each user based on the user role.
The user role is stored in $_SESSION['role'], so you can do something like this:

Code: Select all

<?php 
session_start();
if ($_SESSION['role'] == 'group1')
{
   header('Location: group1.php');
   exit;
}
else
if ($_SESSION['role'] == 'group2')
{
   header('Location: group2.php');
   exit;
}
else
if ($_SESSION['role'] == 'group3')
{
   header('Location: group3.php');
   exit;
}
?>
Post Reply