From cda3d23508430f8c2dd07fe9d5731b0ba8f4aa24 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 8 Apr 2018 22:09:08 -0700 Subject: more intelligent handling of level 0 - and remove an extraneous logging function --- Zotlabs/Module/Settings/Features.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Module') diff --git a/Zotlabs/Module/Settings/Features.php b/Zotlabs/Module/Settings/Features.php index 43ca57be2..888032c28 100644 --- a/Zotlabs/Module/Settings/Features.php +++ b/Zotlabs/Module/Settings/Features.php @@ -34,11 +34,16 @@ class Features { $level = get_account_techlevel(); } + if(! intval($level)) { + notice( t('Permission denied.') . EOL); + return; + } + $techlevels = \Zotlabs\Lib\Techlevels::levels(); - unset($techlevels[0]); + // This page isn't accessible at techlevel 0 - logger('techlevels: ' . print_r($techlevels,true)); + unset($techlevels[0]); $def_techlevel = (($level > 0) ? $level : 1); $techlock = get_config('system','techlevel_lock'); -- cgit v1.2.3