Closed sorinpohontu closed 1 year ago
Does the target customer have domains disabled or no domains at all? Worked just fine for me, maybe I've missed something
Same error on any customer I click, also I can't login as customer. Last customer added has a domain, email only.
After errror, I have to clear cookies and site date from Firefox to log in again. I'm always redirected to customer_index.php
.
Any log I can check ?
Settings -> Panel settings -> Hide menu items and traffic charts in customer panel, is "Domains" selected there?
Yes
Okay, this option leads to the customer not being allowed to call "SubDomains.listingCount()" API method, please try the following patch:
diff --git a/lib/Froxlor/CurrentUser.php b/lib/Froxlor/CurrentUser.php
index 26c836a3..211fd470 100644
--- a/lib/Froxlor/CurrentUser.php
+++ b/lib/Froxlor/CurrentUser.php
@@ -151,9 +151,13 @@ class CurrentUser
]);
$addition = $result['emaildomains'] != 0;
} elseif ($resource == 'subdomains') {
- $parentDomainCollection = (new Collection(SubDomains::class, $_SESSION['userinfo'],
- ['sql_search' => ['d.parentdomainid' => 0]]));
- $addition = $parentDomainCollection->count() != 0;
+ if (Settings::IsInList('panel.customer_hide_options', 'domains')) {
+ $addition = false;
+ } else {
+ $parentDomainCollection = (new Collection(SubDomains::class, $_SESSION['userinfo'],
+ ['sql_search' => ['d.parentdomainid' => 0]]));
+ $addition = $parentDomainCollection->count() != 0;
+ }
} elseif ($resource == 'domains') {
$customerCollection = (new Collection(Customers::class, $_SESSION['userinfo']));
$addition = $customerCollection != 0;
Yes, it working 👍
Great, thanks for the feedback, very helpful :)
I have updated one system to Froxlor 2.0.2.3 and I can't access customer area from admin account.
System information
Any hints ?