How to make FEUsers {$url_forgot} work on protected pages?

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
User avatar
stefhoesli
Forum Members
Forum Members
Posts: 56
Joined: Mon Sep 19, 2011 1:06 pm
Location: Zurich, Switzerland

How to make FEUsers {$url_forgot} work on protected pages?

Post by stefhoesli »

I am using the latest version of CMS MS and FEUsers. On every page I display a FEUsers link for users who have forgotten their password, using the {$url_forgot} tag of the FEUsers module.

Some content on my site is protected, with a construct like this:

{if $ccuser->loggedin() && $ccuser->memberof('Mitglieder')}
{content}
{else}
Not allowed...
{/if}

The problem is, that if a user is on a protected page, and then wants to use the "lost password" link, then the password reset information is also protected and the "Not allowed..." is displayed instead.

How can I make CMS MS to show the forgot password information?
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12709
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: How to make FEUsers {$url_forgot} work on protected page

Post by Dr.CSS »

You can put the forgot password form in the 'Not Allowed' part which shouldn't show if logged in or put it on a not protected page with a link to that page in the not allowed area...
User avatar
stefhoesli
Forum Members
Forum Members
Posts: 56
Joined: Mon Sep 19, 2011 1:06 pm
Location: Zurich, Switzerland

Re: How to make FEUsers {$url_forgot} work on protected page

Post by stefhoesli »

I tried to add the content of the "Forgot Password Template" to the "not allowed..." section. But now my problem is, that the field for the username is displayed, but these three tags don't work:

{$hidden}{$submit}{$cancel}

Accordingly I the submit and cancel buttons are now missing...
staartmees
Power Poster
Power Poster
Posts: 1049
Joined: Wed Mar 19, 2008 4:54 pm

Re: How to make FEUsers {$url_forgot} work on protected page

Post by staartmees »

You can't just use a template form a module without calling that module.

Code: Select all


{if $ccuser->loggedin() && $ccuser->memberof('Mitglieder')}
{content}
{else}
Not allowed...
{FrontEndUsers}
{/if}

or

Code: Select all


{if $ccuser->loggedin() && $ccuser->memberof('Mitglieder')}
{content}
{else}
Not allowed...
{FrontEndUsers form="forgotpw"}
{/if}

User avatar
stefhoesli
Forum Members
Forum Members
Posts: 56
Joined: Mon Sep 19, 2011 1:06 pm
Location: Zurich, Switzerland

Re: How to make FEUsers {$url_forgot} work on protected page

Post by stefhoesli »

Thanks, it works better now!

But unfortunately I still have a problem: After I enter an e-mail address in the field and press send, the corresponding answer is not displayed. Again of course since this content is still protected. So I do get a password (If there was no typo in the e-mail address), but I don't see the reply and accordingly don't know if it worked or not...
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12709
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: How to make FEUsers {$url_forgot} work on protected page

Post by Dr.CSS »

Look for a parameter in the Help along the lines of inline=...
User avatar
stefhoesli
Forum Members
Forum Members
Posts: 56
Joined: Mon Sep 19, 2011 1:06 pm
Location: Zurich, Switzerland

Re: How to make FEUsers {$url_forgot} work on protected page

Post by stefhoesli »

According to help there is a noinline="" parameter. But I don't know how to use it. I tried:

{FrontEndUsers form="forgotpw" noinline="1"}
{FrontEndUsers form="forgotpw" noinline="yes"}
and
{FrontEndUsers form="forgotpw" noinline=""}

But none of them will replace the current content block with the actual output after form submission.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12709
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: How to make FEUsers {$url_forgot} work on protected page

Post by Dr.CSS »

The first one is correct, it may be a good idea to put another content block in the template and put that call in it so the results know where to go...
Post Reply

Return to “Modules/Add-Ons”