Password recovery token is not working.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
8 anni tempo fa
Hi

I have upgrade the project 3.5 to 3.60 but now I am facing one problem which is when I click on password recovery link the system throwing invalid token message.I have checked in database in GenericAttribute table where entityid is 52134 for key "PasswordRecoveryToken" but in GetAttribute function returning another BaseEntityID for key "PasswordRecoveryToken" therefore system is throwing "wrong token" message.Below are code :

Nop.Service ->common->GenericAttributeExtensions.cs ->
public static TPropType GetAttribute<TPropType>(this BaseEntity entity, string key, int storeId = 0)
        {
            var genericAttributeService = EngineContext.Current.Resolve<IGenericAttributeService>();
            //if (key == "PasswordRecoveryToken")
            //{
            //    entity.Id = 527570; //for PasswordRecoveryToken if you want so then you can uncomment this line. i know this is not right way to do.
            //}
            return GetAttribute<TPropType>(entity, key, genericAttributeService, storeId);
        }  


Please suggest me how can I fix the problem .
7 anni tempo fa
Hi Sanjib, I'm having this problem too, did you find cause, how did you solve it?
7 anni tempo fa
I was truncate the table then issue was fixed.
7 anni tempo fa
Sanjib, That sounds like a solution. Could you please tell me which table to truncate?
7 anni tempo fa
GenericAttribute table
7 anni tempo fa
Hey Sanjib, Thank you for that. What about all the data in in the table though. Is it not used by the system? GenericAttribute has thousands of rows :-) . I don't understand the cause of the problem. Is it possible to address the cause directly?
7 anni tempo fa
Hi Sanjib, Just to give you an update, I deleted the two existing password recovery token rows (WHERE [Key] = 'PasswordRecoveryToken' (sp?)), all two of them, and then my test worked. I assume this has fixed the problem, so, Thank you very much. I have asked my client to also conduct a test to confirm the fix, which I expect to work.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.