DataObjects/Person.php
authorAlan Knowles <alan@roojs.com>
Wed, 17 Jul 2013 11:25:38 +0000 (19:25 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 17 Jul 2013 11:25:38 +0000 (19:25 +0800)
DataObjects/Person.php

index c5ee3aa..bec840f 100644 (file)
@@ -225,7 +225,8 @@ class Pman_Core_DataObjects_Person extends DB_DataObject
     function verifyAuth()
     { 
         $ff= HTML_FlexyFramework::get();
-        if (!empty($ff->Pman['auth_comptype']) && $ff->Pman['auth_comptype'] != $this->company()->comptype) {
+        if (!empty($ff->Pman['auth_comptype']) &&
+            (!$this->company_id || ($ff->Pman['auth_comptype'] != $this->company()->comptype)) {
             $ff->page->jerr("Login not permited to outside companies");
         }
         return true;