Page 1 of 1

Protected Member Area?

Posted: Sat Mar 26, 2022 8:41 am
by wmcig
I am new here. Is there any plugin or other way to create a protected area with frontend login ?

Re: Protected Member Area?

Posted: Sun Mar 27, 2022 11:40 am
by wiz
Hello wmcig, there is currently no such plugin.

There's probably a simpler way, to just put an if statement in your "theme.php" to not load any content if the the admin isn't logged in for specific pages. I could prepare a quick example if you're interested?

Re: Protected Member Area?

Posted: Sun Mar 27, 2022 11:50 am
by wmcig
Hi, I need a login for different users, which are see different contents.

Please give me your example.

Re: Protected Member Area?

Posted: Sun Mar 27, 2022 12:39 pm
by wiz
Now I understand your idea better, however this isn't possible without major modifications, since WonderCMS supports only 1 user (admin) without additional configurable permissions.

However, in your theme.php, you could define something like

Code: Select all

<?php if ( $Wcms->currentPage == 'about' && $Wcms->loggedIn) : ?>
    your content
<?php endif ?>
It would only display the content if the admin is logged in on the "about" page.