hello everyone
i just deleted admin privileges by mistake on opencart panel. and whenever i log in admin on panelit just shows dashboard. nothing else.
so checked phpmyadmin oc_user group and oc user and its looking as it would be.
so i think i have to do something on ftp please someone! illuminate me
i just deleted admin privileges by mistake on opencart panel. and whenever i log in admin on panelit just shows dashboard. nothing else.
so checked phpmyadmin oc_user group and oc user and its looking as it would be.
so i think i have to do something on ftp please someone! illuminate me
Log in using FTP, and then make this edit:
That will enable all areas for all users, so you can then go to your admin panel and re-save the permissions in Users > User Groups. Don't forget to remove the edit after you've done that, or permissions will not be checked at all.
Code: Select all
IN:
/system/library/user.php OR /system/library/cart/user.php
AFTER:
public function hasPermission($key, $value) {
ADD:
return true;
Hey, thanks a lot. this just helped me!
Your Local Store.
http://www.frishops.ca
http://www.frishops.cn
Hi,
can you please clarify where exactly to put return true; in the code you specified:
can you please clarify where exactly to put return true; in the code you specified:
Code: Select all
public function hasPermission($key, $value) {
if (isset($this->permission[$key])) {
return in_array($value, $this->permission[$key]);
} else {
return false;
}
}
After this line:
You add a new line with this code:
Don't forget to remove the line you added after you're able to re-save your permissions.
Code: Select all
public function hasPermission($key, $value) {
You add a new line with this code:
Code: Select all
return true;
Don't forget to remove the line you added after you're able to re-save your permissions.
Hi there,
I'm having a similar issue after a client removed his permissions. I've added the extra line (as shown in the screenshot) to system/library/cart/user.php (v2.3.0.2) but it's not making any difference. Is there anything else I might have missed ?
I'm having a similar issue after a client removed his permissions. I've added the extra line (as shown in the screenshot) to system/library/cart/user.php (v2.3.0.2) but it's not making any difference. Is there anything else I might have missed ?
Hi, Thanks for thisJohnathan wrote: ↑Wed Oct 18, 2017 11:57 pmAfter this line:
Code: Select all
public function hasPermission($key, $value) {
You add a new line with this code:
Code: Select all
return true;
Don't forget to remove the line you added after you're able to re-save your permissions.
I too by accident deleted my admin permissions, I am on OpenCart 3
I added the line on cart/user.php
And now I can Select All permissions, and Save, with no issues, however, it is not really "saved"
Once I revisit the User Group permissions, all the vital permissions are unchecked.
I tried refreshing and clearing mods etc.
Any suggestions?
Thanks
Sam
Sounds like you have something more going on, then. I'd suggest uninstalling any mods you have installed (especially ones with ocMod or vQmod files, since those are likely to be the cause) and see if that helps.
If not, you may need to hire someone to take a look for you. If you need to find a developer, you should post a request in the OpenCart "Commercial Support" forum, which is checked by a number of OpenCart developers. You can also try checking out the OpenCart "Partners" area.
If not, you may need to hire someone to take a look for you. If you need to find a developer, you should post a request in the OpenCart "Commercial Support" forum, which is checked by a number of OpenCart developers. You can also try checking out the OpenCart "Partners" area.
This code helping, but all permission become enable with or without checking the lists. Any suggestion how to make permission can be arrangeable like opencart normally do without error issue?Johnathan wrote: ↑Wed Oct 18, 2017 11:57 pmAfter this line:
Code: Select all
public function hasPermission($key, $value) {
You add a new line with this code:
Code: Select all
return true;
Don't forget to remove the line you added after you're able to re-save your permissions.
I had the same problem and added the line in USER.PHP, I could login, I cleared the cache from OCMOD and now I get an ERROR500 when I try to go to my admin page. I deleted the link in USER.PHP again but still I get the error when going to www......com/admin. What can I do, I can't login anymore...Johnathan wrote: ↑Tue Jul 31, 2018 10:47 pmSounds like you have something more going on, then. I'd suggest uninstalling any mods you have installed (especially ones with ocMod or vQmod files, since those are likely to be the cause) and see if that helps.
If not, you may need to hire someone to take a look for you. If you need to find a developer, you should post a request in the OpenCart "Commercial Support" forum, which is checked by a number of OpenCart developers. You can also try checking out the OpenCart "Partners" area.
Error logs.I had the same problem and added the line in USER.PHP, I could login, I cleared the cache from OCMOD and now I get an ERROR500 when I try to go to my admin page. I deleted the link in USER.PHP again but still I get the error when going to www......com/admin. What can I do, I can't login anymore...
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
So my frontpage works normal, only when I go to my admin page I get this error.straightlight wrote: ↑Thu Jan 28, 2021 1:54 amError logs.I had the same problem and added the line in USER.PHP, I could login, I cleared the cache from OCMOD and now I get an ERROR500 when I try to go to my admin page. I deleted the link in USER.PHP again but still I get the error when going to www......com/admin. What can I do, I can't login anymore...
Parse error: syntax error, unexpected 'if' (T_IF) in /home/users/system/storage/modification/system/library/cart/user.php on line 73
public function hasPermission($key, $value) {
if (isset($this->permission[$key])) {
return in_array($value, $this->permission[$key]);
} else {
return false;
}
These are te only log lines since yesterday.
2021-01-27 12:07:33 - PHP Notice: Undefined index: product_id in /home/users/catalog/controller/extension/module/ianalytics.php on line 83
2021-01-27 15:39:32 - PHP Notice: Undefined index: custom_h1 in /home/users/vqmod/vqcache/vq2-system_storage_modification_catalog_controller_product_category.php on line 123
Contact extension/module developer support.
Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer
Johnathan wrote: ↑Wed Oct 18, 2017 11:57 pmAfter this line:
Code: Select all
public function hasPermission($key, $value) {
You add a new line with this code:
Code: Select all
return true;
Don't forget to remove the line you added after you're able to re-save your permissions.
Who is online
Users browsing this forum: No registered users and 64 guests