3

This request is a little difficult to explain.

I have a page the requests a login to access the page. I have created a default username and password that potential customers can use to access the page. However, I think people aren't even bothered to enter the default username and password. Therefore, I would like to users to be able to click on the link to the page and automatically be logged in to access the page.

I thought that one solution might be to somehow configuring Joomla so the username and password is already entered so that when a user clicks on the link they're automatically taken to the page, but I dont know how to do that.

If someone could show me, or have any other suggestions, that would be great.

  • Hi Community, can I get some help with this please. I understand the way I have phrased the question might be a little confusing, but let me know if you need further clarification. – cpatte7372 Jan 5 '16 at 10:14
1

You can use a few lines of jQuery to fill out the form. Just make sure the username/password you provide only gives limited access to your site.

(function($) { 
    $("#username").val("Guest");
    $("#password").val("guest123");
})(jQuery);

By adding this code to your page, the fields will be filled in with your login data. The user will still have to click the login button, though. If you also want to submit the form automatically, you can do something like this after line #3:

$(".login form").submit();

(In order to add the script to your page, you can use an extension like Sourcerer or similar).

1

Joomla Autologin Extension

There are free plugins available to do this at textarea.it but the link is currently broken. Direct links to the plugins still seem to be working:

Allow Logins from customer IP Addresses

Another option may be to install Auto Login IP or Regular Labs IP Login (both free) or similar so authorised customers can login without entering credentials.

This is probably only practical for customers with static IP addresses so may not be suitable in your situation.

Develop your own login page

You can probably implement your own login page along the lines of https://stackoverflow.com/a/4195116/1983389 to achieve similar functionality to the Joomla Autologin Extension above.


Security Considerations

Note: As per the Stack Overflow post, some of these methods are not a good idea from a security point of view and you should think carefully about the security implications before proceeding.

  • Neil, thanks. Going to try the plg_autologin. As regards, Auto Login IP, or NoNumber IP Login. You mentioned that customers would need a static ip address for this to work. Do you mean a static public IP Address? – cpatte7372 Jan 5 '16 at 10:58
  • To enable IP addresses, customers would need to tell you what IP address they are using. This will only work if they are regularly logging in from the same IP address. This might be possible in a work environment but users logging in from home or roaming may not always have the same IP address. – Neil Robertson Jan 5 '16 at 11:02
  • OK. I understand. Anyway, I have successfully installed plg_autologin 2.5.2. However, I can't find it when I do a search for it in plugin manager to enable it. I searched for it with name 'autologin', but nothing appeared. Any thoughts - I'm clearly a novice :-( – cpatte7372 Jan 5 '16 at 11:18
  • OK. It looks like the plugin name is "System - Autologin". You may need to amend the Default List Limit to "All" or advance to a subsequent page before you see it in the list. – Neil Robertson Jan 5 '16 at 11:24
  • 1
    OK. You might need to modify your question or ask a new question. – Neil Robertson Jan 5 '16 at 12:27

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.