Login to website, close and reopen

Need help with the Administration of your Joomla! 3.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
embeathome1
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Wed Feb 14, 2018 4:06 pm

Login to website, close and reopen

Post by embeathome1 » Fri Feb 16, 2018 3:51 pm

Hello,

i have following scenario - almost complete website will be only for Registered users. Just 1-2 pages will be public.
I have login form working OK, logout also OK. Login form is the only thing on Home page (except Contact Us), Home page is white and Blank, no pictures, etc. Above the login form there is a Sentence saying "if you want to view this website, please log in first".

Imagine situation when customer logs in to the website and additionally marks "Remember me", then he checks the website content and finds what he is looking for and then he closes the website. Next day he comes to the office, open the website again and he will end up of course again on Home page where the sentence "if you want to view this website, please log in first" but login form is of course not there, because he marked before "remember me"

So what I would like to have is that http://www.mydomain.com for first time users will show Login form, but for those who returned and they are still logged in (either they marked "Remember me" or they closed the website and reopen in very short period of time so the system didn't logged them off) will end up in Home page with full content.

I am simply too new to Joomla and creating websites, that I cannot figure this out, how to do it. I have no experience with coding additionally.

I successfully managed Login and Log out to work, setting of Access levels so when someone logs in, tyhe menu turns on to Log out etc, but this Home page settings...I am unable to find out. Could someone please help me how to?

Thanks
martin

User avatar
Jeyjoo
Joomla! Explorer
Joomla! Explorer
Posts: 344
Joined: Tue Jul 19, 2011 8:56 am
Location: Monaco
Contact:

Re: Login to website, close and reopen

Post by Jeyjoo » Fri Feb 16, 2018 7:08 pm

You need to use Access Control Levels on your content. Here is the general idea:

Show the logon form to Guest only ie. non-logged in users.
Then for logged in users you need to add menus and modules with Access set to "registered".
Good luck
Ultimate guide to setting up a Joomla MULTILANGUAGE website
https://jeyjoo.com/blog/how-to-create-a ... -joomla-3/
Guida siti MULTILINGUE in Joomla
https://jeyjoo.it/blog/creare-un-sito-m ... -joomla-3/

embeathome1
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Wed Feb 14, 2018 4:06 pm

Re: Login to website, close and reopen

Post by embeathome1 » Sat Feb 17, 2018 9:22 am

I have set all as follows:

When visitor enters the site, he is prompted to Login. Once logged in, it shows welcome and option to logout. This is what I don't want. I want to open Home page with content. I could redirect Home page to any page I want. But once logged user closes the browser and later on opens it again and enter the site, he gets Logout option again.

So after loggin in to website, it works OK but after user closes it and open again, it returns to Home page, where he could log off.

I am playing with this for days already and cannot figure it out. Once again what I need:

- when customer visits the http://www.mydomain.com, he is prompted to log in. Login module is a part of Home page and it is set as Public (in case of Guest, it shows error 403)
- once he logs in, it reveals complete content of the website with all menus and so on.
- once he logs off, it returns him to login form
- but once he stays logged in and closes the website and next day he comes back, I would need to reveal complete content again, without option of log off in the centre of the page

Login module postion is 7. I am using Helix 3 template. joomla 3.8.5

Curreently I have following Menus:

- Log in (Main menu) - Set to Guest
- Home (Main menu) - Set to Registered and also this menu set as default
- Contact Us (Main menu) - set to Regitered
- Log off (Main menu) - Set to registered

And I have following Modules:

- Main Menu - Set to Registered
- Login - Set to guest

I tried all the combinations but none of them works. Once I am logged in and close website completely, reopen, it shows button "Log off" instead of full content of the Home page.

Shall I set Login Menu and Login form as Default page? I think I am doing something wrong here and I feel it is much easier than I expect.
Last edited by embeathome1 on Sat Feb 17, 2018 9:29 am, edited 1 time in total.

User avatar
Jeyjoo
Joomla! Explorer
Joomla! Explorer
Posts: 344
Joined: Tue Jul 19, 2011 8:56 am
Location: Monaco
Contact:

Re: Login to website, close and reopen

Post by Jeyjoo » Sat Feb 17, 2018 9:29 am

Hi. That sounds about right - with Access Control you should be able to accomplish exactly what you want.
The problem could be any one of a number of issues including menu settings, site configuration, SEF or even .htaccess causing the problem.

Instead of going mad, I would get someone to look at it.
Ultimate guide to setting up a Joomla MULTILANGUAGE website
https://jeyjoo.com/blog/how-to-create-a ... -joomla-3/
Guida siti MULTILINGUE in Joomla
https://jeyjoo.it/blog/creare-un-sito-m ... -joomla-3/

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30934
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Login to website, close and reopen

Post by Per Yngve Berg » Sat Feb 17, 2018 9:50 am

Have you enabled the plugin Authentication Cookie?

It also depends on how soon after the user reopens the site, before or after the session expired.

embeathome1
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Wed Feb 14, 2018 4:06 pm

Re: Login to website, close and reopen

Post by embeathome1 » Sat Feb 17, 2018 10:42 am

Jeyjoo wrote:Hi. That sounds about right - with Access Control you should be able to accomplish exactly what you want.
The problem could be any one of a number of issues including menu settings, site configuration, SEF or even .htaccess causing the problem.

Instead of going mad, I would get someone to look at it.
Unfortunately I don't know anybody who could help me here locally :(

Would it be possible if someone from here helps me lets say by accessing the page or teamviewer?

embeathome1
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Wed Feb 14, 2018 4:06 pm

Re: Login to website, close and reopen

Post by embeathome1 » Sat Feb 17, 2018 9:07 pm

Per Yngve Berg wrote:Have you enabled the plugin Authentication Cookie?

It also depends on how soon after the user reopens the site, before or after the session expired.
Yes, this is enabled. I still cannot proceed further as the result is still the same unfortunately.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30934
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Login to website, close and reopen

Post by Per Yngve Berg » Sat Feb 17, 2018 9:49 pm

Have you set any Redirect after Login in the menu item or login module?

Why are you using both the module and component (menu item)?

embeathome1
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Wed Feb 14, 2018 4:06 pm

Re: Login to website, close and reopen

Post by embeathome1 » Sat Feb 17, 2018 10:05 pm

Per Yngve Berg wrote:Have you set any Redirect after Login in the menu item or login module?

Why are you using both the module and component (menu item)?
Yes, I did, one of the pages, Contact Us, I temporarily set to Registered. And redirect works fine.

Regarding your second question - no idea. I somehow ended up like this. What is the best? What I would like to, is to have login form in the center of the page when visitor comes. I don't need login form in top menu. But when I disabled Login form in top menu, page is not opening at all.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30934
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Login to website, close and reopen

Post by Per Yngve Berg » Sat Feb 17, 2018 10:21 pm

The Menu item is what shows the login form in the content area. The login module shows the form in a module position. After login in, the module will show your name and a logout button.
Are two login forms showing?

embeathome1
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Wed Feb 14, 2018 4:06 pm

Re: Login to website, close and reopen

Post by embeathome1 » Sun Feb 18, 2018 9:05 am

Per Yngve Berg wrote:The Menu item is what shows the login form in the content area. The login module shows the form in a module position. After login in, the module will show your name and a logout button.
Are two login forms showing?
And that is what I don't want - showing my name and logout button. I want to show full content of the website after logging in.

For the time beeing I disabled showing login form in the menu, so it is now only visible after not logged in visitor visits the website. After logging in, i redirected user to Contac us page, which is the only page currently ready and it is restricted to registered users only. Menu also shows Logout (not button but menu item), once clicked, it returns the user to Login form in the center of the page. This is how I want it, but I see the problem, when the user closes browser, reopens it lets say after 1 hour, and it brings him to page where Log off buton is in the centre of the page. I want that user comes back (when still logged in when he ticked "remember me" ) to page Contact us.

My plan is to prepare something like Home page or intro page, which will be accessible only for registered users with full menu, content etc, so when they are logged in, they will always come to this "intro/home" page. Otherwise, when not logged in, there will be no Menu and they will only see login form in the centre of the page.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 30934
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Login to website, close and reopen

Post by Per Yngve Berg » Sun Feb 18, 2018 1:11 pm

Your problem is that the default menu item is set to Registered.

When someone is entering your site, they go to the default menu item, but there is no access to it.

Change the default menu item to a category blog with a category that contains two articles (one Guest and one Registered). The menu item must be Public.

Embed the login module into the articles.

https://docs.joomla.org/How_do_you_put_ ... article%3F

embeathome1
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Wed Feb 14, 2018 4:06 pm

Re: Login to website, close and reopen

Post by embeathome1 » Sun Feb 18, 2018 5:59 pm

Thank you! Will havr a look in that and come back :)


Locked

Return to “Administration Joomla! 3.x”