DataObjects/Core_notify.php
[Pman.Core] / DataObjects / Person.php
index d8aa1a6..5f397b6 100644 (file)
@@ -229,7 +229,11 @@ class Pman_Core_DataObjects_Person extends DB_DataObject
             (!$this->company_id || ($ff->Pman['auth_comptype'] != $this->company()->comptype))
            ){
             
-            
+            // force a logout - without a check on the isAuth - as this is called from there..
+            $db = $this->getDatabaseConnection();
+            $sesPrefix = get_class($this) .'-'.$db->dsn['database'] ;
+            $_SESSION[__CLASS__][$sesPrefix .'-auth'] = "";
+            return false;
             
             $ff->page->jerr("Login not permited to outside companies");
         }
@@ -358,7 +362,9 @@ class Pman_Core_DataObjects_Person extends DB_DataObject
     function login()
     {
         $this->isAuth(); // force session start..
-        $this->verifyAuth();
+        if (!$this->verifyAuth()) {
+            return false;
+        }
         $db = $this->getDatabaseConnection();