User tests: Successful: Unsuccessful:
This Pull Requests adds a new Menu Item Type "Logout" to the available menu item types. It allows users to create a menu item "Logout" that directly logouts a user when clicking on the menu item. Optionally you can set a page to redirect after logout, otherwise the user will be redirected to the default (home) page.
In this way it is no longer needed to use the "Login" menu-item type to logout, which shows a page with a "Logout" button only.
For the JFIELD_LOGOUT_REDIRECT_PAGE_DESC
and JFIELD_LOGOUT_REDIRECT_PAGE_LABEL
the same description is used as for the mod_login with the similar functionality (MOD_LOGIN_FIELD_LOGOUT_REDIRECTURL_DESC
and MOD_LOGIN_FIELD_LOGOUT_REDIRECTURL_LABEL
).
After applying the patch you can create a new menu-item from type "Logout"
Provide a title and typically you would set the Access to "Registered" so only logged-in users can see the logout menu-item.
Optionally you can select a "Logout Redirection Page" under "Options" that will be used to redirect the user to after logout. "Default" will return to the default (home) page.
Save the menu item and login with a user on the frontend of the website. The logout menu item should be visible. Clicking on the logout menu item should end your user session and redirect to the page set.
Status | New | ⇒ | Pending |
Labels |
Added:
?
?
|
Labels |
Added:
?
|
Milestone |
Added: |
Easy | No | ⇒ | Yes |
Category | ⇒ | Front End |
Nice patch Sander! Works as expected!
Excellent new feature! No more having to use a 3pd extension to accomplish this task.
Tested and found to work great.
Tested. All good!
@brianteeman Can we get your language review? If you are ok with it we can set it RTC ;) Thanks for all the testers and @sanderpotjer
Quote: "Provide a title and typically you would set the Access to "Registered" so only logged-in users can see the logout menu-item."
The other way around: Is there a way to hide a login menu-item for registered users, when the have logged in?
When using a login menu-item and a logout menu-item both menu-items are visible after a successful login. Ideally only the logout menu-item should be visible.
@waader yes you can hide login items for users who are logged in. See
https://brian.teeman.net/joomla/415-the-guest-user-group-hiding-menu-items-and-modules
On 17 August 2015 at 19:33, waader notifications@github.com wrote:
Quote: "Provide a title and typically you would set the Access to
"Registered" so only logged-in users can see the logout menu-item."The other way around: Is there a way to hide a login menu-item for
registered users, when the have logged in?When using a login menu-item and a logout menu-item both menu-items are
visible after a successful login. Ideally only the logout menu-item should
be visible.—
Reply to this email directly or view it on GitHub
#7703 (comment).
Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/
one more successful test - Thanks
@brianteeman Thanks for the hint!
Thanks all for your feedback & testing!
All good.
@brianteeman can we RTC or do we need language changes?
Everything worked well!
@test The logout-option is very easy and fast to be set up. Successful test and nice patch
Create a new Menu-Item -> Users -> Logout and let the Default-Option. Logged in as Administrator and it Works. Very cool and easy to use.
Status | Pending | ⇒ | Ready to Commit |
@test success, after applying the patch I can see a new "Logout" option for com_users, creating a menu item as described and clicking on it after I've logged in, the logout went fine.
Labels |
Added:
?
|
I have missed this so many times. Thanks!
Works as expected.
Perfect.
I have tested this item successfully on 1d8e29c
Nobody clicked the "Tested Succesfully" button so it won't be completed.
Nice option Sander
Worked as expected
Thanks Sander
I have tested this item successfully on 1d8e29c
Works.
Thanks @sanderpotjer merged into 3.5-dev with commit 489fb6
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-10-17 08:30:59 |
Closed_By | ⇒ | roland-d |
Labels |
Removed:
?
|
Default logout page set to the homepage instead of current page. Usage of current page is not possible as that would be the logout page (results in loop). Default page makes more sense as well to prevent 404 errors on logout when logging out while being on a page that is only visible for registered users.