No option to logout users from backend

Need help with the Administration of your Joomla! 4.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
Post Reply
sjb1963
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Tue Mar 11, 2008 7:48 am

No option to logout users from backend

Post by sjb1963 » Sat Jan 15, 2022 5:08 pm

Hello,
This option was available in Joomla 3.9.x and is very handy.
I have been unable to locate any switch or setting to enable this option again from the backend of Joomla 4.

Anyone have any clues on this?

User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 7656
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: No option to logout users from backend

Post by AMurray » Sat Jan 15, 2022 11:55 pm

Please clarify: you want to force the log-out of normal front-end users from within the back end (e.g. registered, authors, editors, publishers) or if you mean you're looking for the log out link for your own account, that's under the "User Menu" in the top right corner of the administrator or do you mean you want to be able to force users of the administrator area to be logged out (e.g. other administrators, managers super users)?

I recall earlier discussions for Joomla 3 about this (viewtopic.php?t=946527 and viewtopic.php?t=923252) and the conclusion was it works when your session handler is set to "database" as opposed to others such as "filesystem"' or "memcached" as I am seeing in my J4 site just now (the J3 terminology may have been slightly different). I'm not sure it works with administrator-side users or just front-end users (in either J3 or J4).

Personally I use 'filesystem' as that's the often recommended method from members on the forum here and I don't need the function you're seeking to use.

Try setting the session type to database and see if that makes the difference. Switching the session method will also log-out everyone that's already logged in but that's obviously not the way to do it on a 'routine' basis, this should be a one-off setting - check if it works and what you expect, otherwise, change it back.
Regards - A Murray

User avatar
ceford
Joomla! Guru
Joomla! Guru
Posts: 737
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: No option to logout users from backend

Post by ceford » Sun Jan 16, 2022 5:31 am

Add Logged-in Users Module to Administrator Dashboard. There is a button to force logout of front end users. It works with Database and File session handlers.

sjb1963
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Tue Mar 11, 2008 7:48 am

Re: No option to logout users from backend

Post by sjb1963 » Sun Jan 16, 2022 3:39 pm

Hello,
I do have that module published, but there is no button as described, nor are there any options within the module to turn one on.

I am using Joomla 4.0.5

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 41279
Joined: Sat Apr 05, 2008 9:58 pm

Re: No option to logout users from backend

Post by Webdongle » Sun Jan 16, 2022 6:35 pm

Have you logged in the front end with a test user?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
AMurray
Joomla! Exemplar
Joomla! Exemplar
Posts: 7656
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: No option to logout users from backend

Post by AMurray » Sun Jan 16, 2022 9:14 pm

OK my answer above seems outdated for the current issue.

I'm also not seeing any 'log out' method next to the 'logged in user' in that module. Does it show if you only have a single SU, logged in back and front end, and using the Shared Sessions feature?
Regards - A Murray

sjb1963
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Tue Mar 11, 2008 7:48 am

Re: No option to logout users from backend

Post by sjb1963 » Mon Jan 17, 2022 3:54 pm

I am using the very same settings I have used for every website I've built on Joomla 3.x
This setting does not exist. Not at all.
Wouldn't it be nice? I think so.

User avatar
ceford
Joomla! Guru
Joomla! Guru
Posts: 737
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: No option to logout users from backend

Post by ceford » Mon Jan 17, 2022 4:19 pm

Are you saying that you would like to have a button that forces logout of users logged to the Administrator interface just like the one used to force logout of users logged in to the Site, as aillustrated here:
logged-in-users.png
Or do you want something in the Users list to force logout from there?
You do not have the required permissions to view the files attached to this post.

sjb1963
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Tue Mar 11, 2008 7:48 am

Re: No option to logout users from backend

Post by sjb1963 » Mon Jan 17, 2022 4:47 pm

I do not have anything at all in the "location" column.
That cute little red button to "logout" would be very nice.

What I don't get is how careful I have been not to load half-baked crap into a new Joomla installation and THIS STILL happens. Not happy at all.

User avatar
Maradona
Joomla! Intern
Joomla! Intern
Posts: 77
Joined: Fri Aug 30, 2013 2:08 pm

Re: No option to logout users from backend

Post by Maradona » Mon Jan 17, 2022 5:06 pm

I do have it...default fresh installed of 4.0.5

:pop
Home Dashboard.png
============================================
Modules_ Logged-in Users.png
============================================
Modules_ Logged-in Users - Advance Tab.png
You do not have the required permissions to view the files attached to this post.

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 12474
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: No option to logout users from backend

Post by brian » Mon Jan 17, 2022 5:37 pm

I can't remember the exact reasoning but if you have shared sessions enabled (not the default option) then it is the intended behaviour that the logout button is not available
Last edited by brian on Mon Jan 17, 2022 5:41 pm, edited 1 time in total.
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

User avatar
ceford
Joomla! Guru
Joomla! Guru
Posts: 737
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: No option to logout users from backend

Post by ceford » Mon Jan 17, 2022 5:37 pm

sjb1963 wrote:
Mon Jan 17, 2022 4:47 pm
I do not have anything at all in the "location" column.
That cute little red button to "logout" would be very nice.

What I don't get is how careful I have been not to load half-baked crap into a new Joomla installation and THIS STILL happens. Not happy at all.
The Location column will be empty if $user->client_id === null rather than 1 or 0. So make sure you login to the front end - and try with a newly created user for yourself. And check you don't have an Atum template override for mod_logged.

sjb1963
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Tue Mar 11, 2008 7:48 am

Re: No option to logout users from backend

Post by sjb1963 » Mon Jan 17, 2022 5:48 pm

So, it's not a "bug", it's a feature.
I wonder if anyone actually checked if it was actually useful or not.

User avatar
brian
Joomla! Master
Joomla! Master
Posts: 12474
Joined: Fri Aug 12, 2005 7:19 am
Location: Leeds, UK
Contact:

Re: No option to logout users from backend

Post by brian » Mon Jan 17, 2022 5:51 pm

It's simply not possible if you enable the shared session option (which was not available in j3). The default is still not to use shared sessions and then you get the logout button. This is why everyone else said that it was present for them. You enabled an option that doesnt allow a logout.

As I will write in my answer on github. Shared sessions is just a way to have you logged in on the frontend when you are logged in to the admin. Thats all.
"Exploited yesterday... Hacked tomorrow"
Blog http://brian.teeman.net/
Joomla Hidden Secrets http://hiddenjoomlasecrets.com/

sjb1963
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Tue Mar 11, 2008 7:48 am

Re: No option to logout users from backend

Post by sjb1963 » Mon Jan 17, 2022 5:57 pm

I enable shared sessions so that as the Admin, I do not have to log in twice.
This worked in Joomla 3.x and the option to Share sessions is clearly defined in the global configuration that I am looking at right now.

The point here is that now, as opposed to when it actually worked, it's an either/or proposition which, in my opinion detracts from Joomla, and does not add to it.

So, no, I don't see this as a feature at all. Pretend I'm stupid all you like.

User avatar
sozzled
Joomla! Master
Joomla! Master
Posts: 11868
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia

Re: No option to logout users from backend

Post by sozzled » Mon Jan 17, 2022 9:13 pm

“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 41279
Joined: Sat Apr 05, 2008 9:58 pm

Re: No option to logout users from backend

Post by Webdongle » Mon Jan 17, 2022 9:46 pm

Set shared session logged out of admin and logged back in admin
Logged in front end test user in another browser
No logout button shown in logged in users

Closed browsers
Logged in alternative browser with test user
Logged in admin normal browser
Test user showed twice. First was the log of the previous logged in. Second was the current logged in with a red logout button shown in logged in user.

Works as expected for me
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
ceford
Joomla! Guru
Joomla! Guru
Posts: 737
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: No option to logout users from backend

Post by ceford » Mon Jan 17, 2022 10:06 pm

I guess you could create an override if you want the Logout button whether or not using shared sessions. But this is not a good tool for finding and forcing logout of specific users - there may be hundreds logged in. The order of the handful in the logged in module is not specified. It would be good to have a use case for why the button is there at all and whether some other sort of utility is needed - like a Logout option in the User list Actions button.


Post Reply

Return to “Administration Joomla! 4.x”