- Posts: 50
- Thank you received: 4
Allow users to login with username OR email
Would this be possible for a future version please?
I use a plugin to allow this in other areas of Joomla, but I also have the Hikashop login form on the checkout which only allows login via usename - which might not be the email address as I also use the guest checkout.
Please Log in or Create an account to join the conversation.
I suppose the plugin you have installed also works for the HikaShop login form.
However, the text of the form still says "username", but if you enter the email address in it, it will probably work.
In that case, you can just use a translation override to change the text:
www.hikashop.com/download/languages.html#modify
And on the registration form, you can also remove the "username" field by changing the "registration" setting to "simplified registration with password" in the HikaShop configuration. In that case, HikaShop will automatically use the email address of the user as the username and thus even without any plugin, customers will be able to login with their email address as username.
Please Log in or Create an account to join the conversation.
The plugin doesn't work on the Hikashop checkout login form unfortunately.
I am using guest checkout - don't want to use registration as not many of my customers like to register - so can't set the username to be email that way.
Please Log in or Create an account to join the conversation.
Then I can only recommend to use another plugin. I don't see why it would be a problem to have a login plugin like this work for any login form on the website.
All the login forms, including HikaShop's go through Joomla's JFactory::getApplication()->login() function. And the login system in Joomla has a specific plugin group called "authenticate" for plugins to approve other ways to login besides the standard way:
docs.joomla.org/J3.x:Creating_an_Authent...on_Plugin_for_Joomla
For example, this plugin does exactly what I'm talking about:
extensions.joomla.org/extension/authentication-email/
Please Log in or Create an account to join the conversation.
That is the exact plugin I'm currently actually.
I will double check it, maybe the plugin ordering might have an effect?
Please Log in or Create an account to join the conversation.
I have sent you credentials of my demo site by DM where I have the latest Joomla and Hikashop versions installed, no modifications or overrides.
Please Log in or Create an account to join the conversation.
I do see the issue on your website.
However, I'm not able to reproduce it on my end.
I've installed the plugin and enabled it on a test website on my end, and after that I can login with the email address of a user account through HikaShop's login form on the checkout without a problem.
So I don't understand what's going on. Are you sure that you're using the plugin of my link ?
Please Log in or Create an account to join the conversation.
I will DM you super user access to my test site if you would like to have a look.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Well, I still don't see why it wouldn't work on your website.
The only thing left would be to directly debug the code of the plugin to see why it doesn't work. So we would need a FTP access for that.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I'm not able to access your FTP server.
I'm getting the error:
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
I'm still not able to access your FTP server, even with the new host. Could you please check again the credentials ?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- Posts: 124
- Thank you received: 10
Here is the solution :
In the plugin file \plugins\authentication\email\email.php
The code to get the username is :
To adjust the code you have to change this line by :
Best regards.
Please Log in or Create an account to join the conversation.