1

I need an extension that doesn't show the login form, instead, it redirects to the login page, and after the user is logged in, it displays "Logout" in the pace of the "Login" text.

Example:

1 - Public user opens the site 2 - He sees a link named "Login/Register", or just "Login" 3 - He clicks the link and gets redirected to the login page 4 - He logs in 5 - Now the link's text has changed to "Logout".

Got it?

It's simple, but I can't find it anywhere. I could only find SC Login module, but it gives me a few jquery conflicts, as it uses a modal pop up.

  • 1
    Surely you take a copy of the the mod_login module to do this ;) – Lodder Sep 4 '15 at 20:28
  • You try customize your /modules/mod_login/tmpl/default.php ? For this simple task, you only need change somes CSS class. – Max Sep 4 '15 at 21:40
  • Or you can also doing template override for mod_login. Copy the file /modules/mod_login/tmpl/default.php to this folder : /templates/your_current_active_template/html/mod_login/ and then modify it. This method is update-safe so your modification will remain unchanged when you update your joomla in the future. – webchun Sep 6 '15 at 3:56
  • This question is similar to joomla.stackexchange.com/q/16023/120 – Neil Robertson Apr 25 '16 at 13:26
1

Joomla 2.5 only:

  1. In Users -> Groups, create a new user group called "Guest" with Group Parent = Public
  2. In Users -> Access Levels, create an Access Level called "Guest" with access for the "Guest" user group
  3. In Users -> User Manager options, set the Guest User Group to "Guest"

Joomla 2.5 and 3.x

Create a "Login" menu option or module etc and assign it to the "Guest" access level so that it is only visible to non-logged in users.

Create a "Logout" menu option or module etc and assign it to the "Registered" access level so that it is only visible to non-logged in users.

1

Take a look at a small module I added to the JSE GitHub repository: https://github.com/Joomla-StackExchange/loginButton

It works exactly as you've described, it shows a login text to guests (can be customized and styled as button), and a logout-link to logged-in users (text and layout can also be customized). No popups, no jQuery, just a simple link.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.