Logout link in menu view »User Profile« option

  • reilldesign
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
10 months 1 week ago #158869 by reilldesign
The option show »Logout Link« would be a perfect addition to this menu view. How can I display a logout link at the last position in the user profile? There is an option to logout in the Edit profile section, but there should be a separate logout button for better usability.

Please Log in or Create an account to join the conversation.

More
10 months 1 week ago #158889 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Logout link in menu view »User Profile« option
Hello

If it is needed, you can modify code in the file components/com_osmembership/view/profile/tmpl/default.php, at the bottom, there is osm_logout_form. You can add the logout button inside that form and it should work
Code:
<input type="button" class="<?php echo $bootstrapHelper->getClassMapping('btn btn-primary'); ?>" value="<?php echo Text::_('OSM_LOGOUT'); ?>" onclick="document.osm_logout_form.submit();" />

Regards,

Tuan

Please Log in or Create an account to join the conversation.

More
10 months 1 week ago #158890 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Logout link in menu view »User Profile« option
If you modify code in that file, remember to move it into template override so that the change won't be lost when you update to future releases of the extension

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • reilldesign
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
10 months 1 week ago #158919 by reilldesign
Replied by reilldesign on topic Logout link in menu view »User Profile« option
Hi Tuan,
thanks for the quick response. I was referring to the tab bar (screenshot). And probably it is more a feature request for the menu view. Users are used to being able to log out of their account.

 

Please Log in or Create an account to join the conversation.

More
10 months 1 week ago #158924 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Logout link in menu view »User Profile« option
Ah, you want to have a separate tab called Logout ? Click on that tab will show the button to allow users to Logout ?

Please Log in or Create an account to join the conversation.

  • reilldesign
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
10 months 1 week ago #158929 by reilldesign
Replied by reilldesign on topic Logout link in menu view »User Profile« option
Or the user is logged out immediately, thus only one click is required. So it behaves also in the Joomla backend.

Please Log in or Create an account to join the conversation.

More
10 months 1 week ago #158933 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Logout link in menu view »User Profile« option
I don't think we can embed a link into a tab title. So there must be two clicks if it is even implemented

Tuan

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc