fix empty system for BAdmin
authorAlan Knowles <alan@roojs.com>
Mon, 8 Feb 2021 07:26:19 +0000 (15:26 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 8 Feb 2021 07:26:19 +0000 (15:26 +0800)
Pman/Login.php

index 05d0f17..01908bf 100644 (file)
@@ -234,7 +234,7 @@ class Pman_Login extends Pman
         if(!$u->loginPublic()){
             $this->jerr('Switch fail');
         }
-        
+         
         $this->jok('OK');
     }
     
@@ -252,6 +252,12 @@ class Pman_Login extends Pman
         if (!empty($_REQUEST['logout'])) {
            return $this->logout();
         }
+         
+        if(!empty($_REQUEST['check_owner_company'])) {
+            $core_company = DB_DataObject::factory('core_company');
+            $core_company->comptype = 'OWNER';
+            $this->jok($core_company->count());
+        }
         
         if (!empty($_REQUEST['passwordRequest'])) { //|| (strpos($_REQUEST['username'], '@') < 1)) {
             return $this->passwordRequest($_REQUEST['passwordRequest']);