From c0b2752dac5075231175834ec6865632492b766d Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 9 Mar 2016 14:19:43 +0800 Subject: [PATCH] JavascriptError.php --- JavascriptError.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/JavascriptError.php b/JavascriptError.php index d0139ac2..50b0fa8e 100644 --- a/JavascriptError.php +++ b/JavascriptError.php @@ -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; } + + + } -- 2.39.2