Hello all,I am developing an e-commerce website.I have created a customer role and have auto assigned this role when the user signs up. After signing up and registering when I log in with the newly registered user I get invalid username password error. Can someone please help!Thank you.
Hi Wahaj Adil
Please try the
GenerateSaltedMD5Hash() function to encrypt the password instead of the encryptpassword action
Thanks & Regards
Hi Suriya,
EncryptPassword action also use same GenerateSaltedSHA512Hash() function for encryption. Nothing wrong in EncryptPassowrd action.
Wait, and try after some hours. Sometimes too many failed login attempts blocked the IP.
Thanks
Hi Rahul,
I don't have knowledge about how these two actions are working, but while using the GenerateSaltedSHA512Hash() function I can able log in without any error. This function is not taking any inputs too(username), and also while checking the user table I could see the salted password by GenerateSaltedSHA512Hash() and EncryptPassword looks different. Please clarify about this if you have any idea.Thanks.
EncryptPassword action takes username and password as input because it Ensures different users with the same password have different password hashes in the database.
I was able to get logged in using the GenerateSaltedSHA512Hash() action.
Hello!!
I think is because you are not saving quite well the password for the User! It happened to me before! :)
You need to encrypt the password, using the username and the password. you have a function for that.
After using this encrypt function you are going to assign the encrypted p+assword to the password attribute of the User.
Let me know if I could help you
ps: I am giving you this solution based on my experience, where I already blocked myself because of not encrypting the password. Let me know if you are encrypting the password.
Kind regards,
Márcio
Hey!
I am encrypting the password still getting the invalid error msg.Please have a look.
Ok, I didn't know, thanks!
Can you share the OML to have a look? or let me know what you are doing to do the login, or how you are saving the new user? i need to see what is inside of the actions and assigns
Sure!
Have a look.Please rectify the mistakes if any.Thank you.
Hi Wahaj,
Have you checked to log in by username instead of email?
In the email input box pass your username if email and username are different.
Yes, I have changed that property as well still the same error is being displayed.Not able to log in with the new signed up user.
I saw this condition on the default login action, based on this site property they are creating the hash with and without a username, this might be failing in your case. You can give it a try by changing the site property value as true if possible.
Thanks.
Sure , I'll have a look at this.
Thank you.