From 8ef75d2be762e8e575e52fa6e8b71e86ffe02d7e Mon Sep 17 00:00:00 2001 From: Prashant Singh Date: Sat, 29 Jun 2019 15:54:35 +0530 Subject: [PATCH] Fixed bug with admins user was coming in check with current company --- .../SAASCustomizer/src/Validation/DatabasePresenceVerifier.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/Webkul/SAASCustomizer/src/Validation/DatabasePresenceVerifier.php b/packages/Webkul/SAASCustomizer/src/Validation/DatabasePresenceVerifier.php index aabc0e6de..532941989 100644 --- a/packages/Webkul/SAASCustomizer/src/Validation/DatabasePresenceVerifier.php +++ b/packages/Webkul/SAASCustomizer/src/Validation/DatabasePresenceVerifier.php @@ -17,7 +17,7 @@ class DatabasePresenceVerifier extends BaseVerifier { $company = Company::getCurrent(); - if (isset($company->id)) { + if (isset($company->id) && $table != 'admins') { return $this->db->connection($this->connection)->table($table)->useWritePdo()->where ('company_id', '=', $company->id); } else { // apply the company id check dynamically here to eliminate unique validation woes