CMSMS 1.6.3
Banners 2.2.1
CustomContent 1.5.3
FrontEndUsers 1.6.9
Users go to URL and get login prompt -> enter correct information -> submit and get login prompt -> enter correct information -> submit and go to proper default page.
template piece:
{if $ccuser->ipmatches('IP,IPrange1,IPs...')}
{content}
{elseif $ccuser->loggedin()}
{cms_module module='FrontEndUsers' form='silent'}
{content}
{else}
Please login to view this page
{cms_module module='FrontEndUsers'}
{/if}
If user is in proper IP range or single IP they get in without issue. Incorrect login information works correctly as well.
Users are always prompted twice for login information. There is not any FEU on page options. The template is the only place FEU and content are called out.
UPDATE:
I have zero cache-able pages.
Do not understand calguy: The 2 content tags are inside an if/elseif/else. Is there an issue with CMSMS logic that we all should be made aware of?
I have downloaded and read the documentation you provided on your website. Unfortunately I did not find anything that would change my approach for this site. Anyone intending to use FEU should read the doc.
FrontEndUsers must login twice before getting main page
FrontEndUsers must login twice before getting main page
Last edited by rvan on Sat Aug 15, 2009 4:11 am, edited 1 time in total.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: FrontEndUsers must login twice before getting main page
don't put {content} into your template twice, it may cause all kinds of problems.
in your case, revise your logic to have an or statement, and nested if statement if necessary.
Also, you may get some help out of the newly released document here:
http://calguy1000.com/downloads.html
in your case, revise your logic to have an or statement, and nested if statement if necessary.
Also, you may get some help out of the newly released document here:
http://calguy1000.com/downloads.html
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: FrontEndUsers must login twice before getting main page
Make sure the pages that use that template are not cacheable.
Nullig
Nullig
Re: FrontEndUsers must login twice before getting main page
First, when replying to other people use the reply button DON'T just edit your post. It is very hard to read.
Your logic is faulty. If they are logged in and from IP show them content X else still show them content X.
That doesn't make any sense.
Your logic is faulty. If they are logged in and from IP show them content X else still show them content X.
That doesn't make any sense.
Re: FrontEndUsers must login twice before getting main page
I'm with ajprog - I don't understand your logic.
What browser are you using to test this? I see a similar issue with having to log in twice, but it only happens with FireFox.
What browser are you using to test this? I see a similar issue with having to log in twice, but it only happens with FireFox.
Re: FrontEndUsers must login twice before getting main page
There is no fault in the logic if you follow it correctly.
1st if: If you are within an allowed IP range or specific IP's then there is no login prompted and you go directly to content.
2nd if: You failed IP test and therefore must login. Login correctly and go to content else back to login screen displaying incorrect name or password.
else: You attempted to get beyond index.php and are not logged in.
I see no logic fault here. In fact this all worked well until 1.5.1 and I upgraded to 1.6.3 as I was unavailable to update this site until recently. Something after 1.5.1 broke and I am attempting to get it to work again. This site has no displayable pages to the general public other than the login screen.
And I apologize for the embedded comments in my original post.
1st if: If you are within an allowed IP range or specific IP's then there is no login prompted and you go directly to content.
2nd if: You failed IP test and therefore must login. Login correctly and go to content else back to login screen displaying incorrect name or password.
else: You attempted to get beyond index.php and are not logged in.
I see no logic fault here. In fact this all worked well until 1.5.1 and I upgraded to 1.6.3 as I was unavailable to update this site until recently. Something after 1.5.1 broke and I am attempting to get it to work again. This site has no displayable pages to the general public other than the login screen.
And I apologize for the embedded comments in my original post.
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: FrontEndUsers must login twice before getting main page
if there is no public content on any page except the login page, then why not do something very simple like:
Your login page can use a different page template if you wish, where {content} is displayed unconditionally
and bob's your uncle.
Code: Select all
{if !$ccuser->ipmatches(...) and !$ccuser->loggedin()}
{redirect_page page='login'}
{/if}
and bob's your uncle.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: FrontEndUsers must login twice before getting main page
Template logic changed to:
{if $ccuser->ipmatches('IP,IPrange1,IPs...') | $ccuser->loggedin()}
{content}
{else}
Please login to view this page
{cms_module module='FrontEndUsers'}
{/if}
Users are still having to input two valid logins to gain entry.
{if $ccuser->ipmatches('IP,IPrange1,IPs...') | $ccuser->loggedin()}
{content}
{else}
Please login to view this page
{cms_module module='FrontEndUsers'}
{/if}
Users are still having to input two valid logins to gain entry.