JavascriptError.php
authorAlan Knowles <alan@roojs.com>
Wed, 9 Mar 2016 06:19:43 +0000 (14:19 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 9 Mar 2016 06:19:43 +0000 (14:19 +0800)
JavascriptError.php

index d0139ac..50b0fa8 100644 (file)
@@ -6,7 +6,22 @@ class Pman_Core_JavascriptError extends Pman {
     
     function getAuth()
     {
-        // authed users only...
+        parent::getAuth(); // load company!
+        $au = $this->getAuthUser();
+       
+        if (!$au) {  
+            $this->jerr("Not authenticated", array('authFailure' => true));
+        }
+        if (!$au->pid()   ) { // not set up yet..
+            $this->jerr("Not authenticated", array('authFailure' => true));
+        }
+        
+        
+        $this->authUser = $au;
+        return true;
     }
     
+    
+    
+    
 }