November 27, 2014 10:21 by
Scott
In this tutorial, we will talk about how to recover administrator password in nopcommerce. Once you have installed nopCommerce, you suddenly deleted administrator account by mistake. So, how do you recover the administrator account?
Don’t be panic. Please just follow this steps below:
1. Login to the database in SQL Server (using tool like SSMS etc)
2. Open the database and run this sql query:
UPDATE Customer
SETDeleted = 0
WHERE Id = 1
The things you need to note:
a. Id is the account id from the "Customer" table of your admin account. Usually id=1 for default admin account. If you create any extra admin account and trying to recover the account, then you
will need to check the "Customer" table to get the correct id for the specific account (or record).
b. All the account records if deleted, never gets permanently deleted from the database. Only the value of column "Delete" change from "False" to "True" if you delete any account. In the sql script, we are simply changing the value back from "True" to "False".
3. How to recover the account if you do not have the "id"?
Well, as long as you remember the username or email address, you can change your sql script accordingly like this:
WHERE Username = 'MyUsername'
Or
WHERE Email = '[email protected]'
Hope this helps!