Categories
Uncategorized

Create An Admin in nopCommerce With Only Database Access

If you only have access to a database for nopCommerce (for example, if you’ve accidentally locked yourself out), here’s a way to create an administrator with access to the database and access to the frontend.

First, register a new user using the standard registration process. Once that’s done, run the following SQL query on the database to assign administrator rights:

INSERT INTO Customer_CustomerRole_Mapping
VALUES (
	(SELECT Id FROM Customer
	WHERE Email = 'YOUR_EMAIL'),
	(SELECT Id FROM CustomerRole
	WHERE SystemName = 'Administrators')
)

Leave a Reply

Your email address will not be published. Required fields are marked *