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

index ce59ee8..5f397b6 100644 (file)
@@ -229,6 +229,10 @@ 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");