From 0226258e7b11e90bdde3c3eb164aafc0999edade Mon Sep 17 00:00:00 2001 From: fabrixxm Date: Tue, 31 Mar 2015 10:24:23 +0200 Subject: [PATCH] Block settings page for unauthorized users fixes issue #1459 --- mod/settings.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mod/settings.php b/mod/settings.php index b01c4fabd..5ae30d7d3 100644 --- a/mod/settings.php +++ b/mod/settings.php @@ -16,6 +16,11 @@ function get_theme_config_file($theme){ function settings_init(&$a) { + if(! local_user()) { + notice( t('Permission denied.') . EOL ); + return; + } + // APC deactivated, since there are problems with PHP 5.5 //if (function_exists("apc_delete")) { // $toDelete = new APCIterator('user', APC_ITER_VALUE); @@ -593,7 +598,7 @@ function settings_content(&$a) { nav_set_selected('settings'); if(! local_user()) { - notice( t('Permission denied.') . EOL ); + #notice( t('Permission denied.') . EOL ); return; }