Post by Ricky27 » Wed Sep 18, 2024 9:32 pm

Hi Guys,

I installed OpenCart (localhost), but I was a little bit too enthusiastic with configuring my settings.
I wanted to configure the two factor settings and now my Admin account is locked. Can I fix this without installing an open cart again?

viewtopic.php?t=230145
In my phpMyAdmin i cannot find anything such as oc_settings.

Newbie

Posts

Joined
Sun Jun 21, 2015 8:20 pm

Post by ADD Creative » Thu Sep 19, 2024 10:14 pm

The database table you are looking for is oc_setting (no s on the end). Also the oc_ prefix may be different if you changed it on install.

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by softmonke » Sat Sep 21, 2024 3:33 am

Yes, it should be oc_setting, where "oc_" is your DB_PREFIX set in "config.php".

Also, just to add on, in your "oc_setting" table, you should search for "config_security" under the "key" column, and simply delete the entire row and 2FA should be disabled. Alternatively, you could run the following SQL query:

Code: Select all

DELETE FROM oc_setting WHERE `key` = 'config_security'
where "oc_" is your DB_PREFIX set in "config.php".

Check out our ever-growing list of extensions for OpenCart here.
Some useful extensions for a better admin experience: Image File Manager ProDrag & Drop Sort Order

Reach out to us at hello@softmonke.com for your OpenCart web development needs or feedback for our extensions.


User avatar
Active Member

Posts

Joined
Tue May 23, 2023 4:42 am


Post by krina234pestro » Mon Sep 23, 2024 5:48 pm

Hello,

Yes, you can unlock your OpenCart admin account without reinstalling. Here are a few steps you can take to regain access:
Access your database using a tool like phpMyAdmin.
Find your OpenCart database and look for the user table.
Locate your admin user account and look for a column related to two-factor authentication (usually named code or similar).
Clear the contents of that column to disable two-factor authentication.
Reset Password (if needed):

If you can’t log in even after disabling 2FA, you can reset your password directly in the database.
In the user table, locate your user account and update the password column. You can use the following SQL query to set a new password (replace new_password with your desired password): UPDATE `user` SET `password` = MD5('new_password') WHERE `username` = 'your_username';
Make sure to replace your_username with your actual admin username.
Clear Cache (if necessary):

Sometimes, caching can cause issues. You can clear the cache by deleting the contents of the system/storage/cache/ directory (make sure to leave the folder itself).
Log In:

After making these changes, try logging into your OpenCart admin panel again.


Posts

Joined
Mon Jul 01, 2024 1:40 pm
Who is online

Users browsing this forum: No registered users and 2 guests