}
static function lookupOwner()
{
+ static $cache = false;
+ if ($cache !== false) {
+ return clone($cache); // no updating this object..
+ }
+
$enum = DB_DataObject::Factory('core_enum')->lookup('COMPTYPE', 'OWNER' );
$companies = DB_DataObject::factory('core_company');
$companies->comptype_id = $enum;
if ($companies->find(true)) {
+ $cache = clone($companies);
return $companies;
}
return false;
$this->isAuth(); // force session start..
$sesPrefix = $this->sesPrefix();
-
$_SESSION[get_class($this)][$sesPrefix .'-auth-timeout'] = -1;
-
$_SESSION[get_class($this)][$sesPrefix .'-auth'] = "";
-
self::$authUser = false;
}
//&& $au->hasPerm('Documents.Documents','S') << this is dependant on the doc modules
- if (!$au->hasPerm('Core.Projects_All','S') ) {
+ if (php_sapi_name() != 'cli' && !$au->hasPerm('Core.Projects_All','S') ) {