Allow users to login with username OR email

  • Posts: 50
  • Thank you received: 4
  • Hikashop Business
3 years 1 month ago #329822

Hi,
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.

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
3 years 1 month ago #329895

Hi,

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.

  • Posts: 50
  • Thank you received: 4
  • Hikashop Business
3 years 1 month ago #329948

Hi,
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.

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
3 years 1 month ago #329956

Hi,

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.

  • Posts: 50
  • Thank you received: 4
  • Hikashop Business
3 years 1 month ago #329976

Hi Nicolas,
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.

  • Posts: 50
  • Thank you received: 4
  • Hikashop Business
3 years 1 month ago #329981

The ordering has no effect, it still doesn't work on the Hikashop checkout login form, while it does in the Joomla login module.
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.

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
3 years 1 month ago #330013

Hi,

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.

  • Posts: 50
  • Thank you received: 4
  • Hikashop Business
3 years 1 month ago #330309

Hi Nicolas, yes I am definitely using that plugin. I have tried both the version linked on the Joomla Extension Directory (2.3.2) and the newer version (2.4.2) available from their website and neither works.
I will DM you super user access to my test site if you would like to have a look.

Attachments:

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

  • Posts: 50
  • Thank you received: 4
  • Hikashop Business
3 years 1 month ago #330311

Sorry, the password was wrong, I have just updated it so you should be able to log in now.

Last edit: 3 years 1 month ago by infinityb.

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
3 years 1 month ago #330313

Hi,

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.

  • Posts: 50
  • Thank you received: 4
  • Hikashop Business
2 years 11 months ago #332429

Hi, if you could have a look that would be great. I have sent FTP details in a private message.

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
2 years 11 months ago #332479

Hi,

I'm not able to access your FTP server.
I'm getting the error:

Command:	USER ************@************.co.uk
Response:	331 User ************@************.co.uk OK. Password required
Command:	PASS ************
Response:	530 Login authentication failed
Could you please double check the FTP credentials you provided ?

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

  • Posts: 50
  • Thank you received: 4
  • Hikashop Business
2 years 11 months ago #332656

Hi, I have sent amended details now

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

  • Posts: 81481
  • Thank you received: 13062
  • MODERATOR
2 years 11 months ago #332658

Hi,

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.

  • Posts: 50
  • Thank you received: 4
  • Hikashop Business
2 years 10 months ago #332732

Hi, I have changed the password and sent you the new one

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

  • Posts: 113
  • Thank you received: 9
  • Hikashop Business
1 year 10 months ago #341993

Hi sorry to re-up an old post put I got the same problem.
Here is the solution :
In the plugin file \plugins\authentication\email\email.php
The code to get the username is :

$username = JFactory::getApplication()->input->post->get('username',null,'RAW');
But during the submit of the login form in hikashop the login is not provided by a field name "username".
To adjust the code you have to change this line by :
$username = JFactory::getApplication()->input->post->get('username', isset($credentials['username']) ? $credentials['username'] : null ,'RAW');
This should fix the problem in all situations.

Best regards.

Last edit: 1 year 10 months ago by info@lerenardquitrace.be.
The following user(s) said Thank You: nicolas

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

Time to create page: 0.092 seconds
Powered by Kunena Forum