Forum
Help with Perch Members
Hi, I've been up and down the documentation for Perch Members, but it's so scarce that I cannot seem to get where I want to go. I love Perch, and have a good understanding of code -I'm just missing something.
I want to set up members for my website, each with their own secure dashboard that can only be accessed by them. I know this can be done but I can't figure it out. Do I implement it using member tags? Or do I implement it using resource buckets? Both? And really the big question is HOW? Right now I have a member tag wrapped around a whole page, but it can still be accessed by anyone, even without logging in.
Any help would be greatly appreciated.
There's pages and pages of members documentation starting here: https://docs.grabaperch.com/addons/members/
If you need additional help then we really need to see your code, so we can see where you have got to.
Thanks for getting back to me. Yeah, I've been through the docs. It doesn't have much to say especially for troubleshooting.
On my server I have a folder named members with the template files (mysite.com/members), and inside of the members folder I have a folder titled "test (mysite.com/members/test) with my own html. What do I have to do to get the "test" folder redirected for a password if not logged in? I have a test member tagged as test thinking it wouldn't let someone see this the test page, but in fact anyone can see it if they know the link.
As for my code, my index.php file in the test folder looks like this:
Thanks for your help.
Hi, I tried inserting the redirect php but the webpage is still able to be accessed by anyone with the link and it doesn't redirect to login. Here's the code variations I tried.
Any thoughts?
What happens? Are you using Perch 2.8.4.?
Thank you. With your support I was able to figure out what I was doing wrong.
One more question. What is the best way on the "index.php" login file, after a user logs in, to redirect them immediately to their own page using member tags. I keep getting a syntax error. I can't figure out what I'm doing wrong.
Here's my code for the index.php login file.
Thanks.
You were missing (2) curly brackets on your if statements...
But your also using
after your page has already output some html, so you'll get a warning saying headers already sent.
You'll want to place the redirect near top of page before any html is output otherwise it will continue to fail.
I HAVE PLACED COMMENTS IN QUOTED CODE