diff options
Diffstat (limited to 'inc/confutils.php')
-rw-r--r-- | inc/confutils.php | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/inc/confutils.php b/inc/confutils.php index 26ed4f087..b2d25fb65 100644 --- a/inc/confutils.php +++ b/inc/confutils.php @@ -241,17 +241,24 @@ function actionOK($action){ // prepare disabled actions array and handle legacy options $disabled = explode(',',$conf['disableactions']); $disabled = array_map('trim',$disabled); - if(isset($conf['openregister']) && !$conf['openregister']) $disabled[] = 'register'; - if(isset($conf['resendpasswd']) && !$conf['resendpasswd']) $disabled[] = 'resendpwd'; - if(isset($conf['subscribers']) && !$conf['subscribers']) { - $disabled[] = 'subscribe'; - } - if (is_null($auth) || !$auth->canDo('addUser')) { + if(!empty($conf['openregister']) || is_null($auth) || !$auth->canDo('addUser')) { $disabled[] = 'register'; } - if (is_null($auth) || !$auth->canDo('modPass')) { + if(!empty($conf['resendpasswd']) || is_null($auth) || !$auth->canDo('modPass')) { $disabled[] = 'resendpwd'; } + if(!empty($conf['subscribers']) || is_null($auth)) { + $disabled[] = 'subscribe'; + } + if (is_null($auth) || !$auth->canDo('Profile')) { + $disabled[] = 'profile'; + } + if (is_null($auth)) { + $disabled[] = 'login'; + } + if (is_null($auth) || !$auth->canDo('logout')) { + $disabled[] = 'logout'; + } $disabled = array_unique($disabled); } |