]> git.mxchange.org Git - friendica.git/blobdiff - mod/settings.php
Block settings page for unauthorized users
[friendica.git] / mod / settings.php
index 4c64e4da63aab21439f69a7d9b2a8824d3609989..5ae30d7d366274969a767ebbb373a5e3dae2c4c4 100644 (file)
@@ -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;
        }
 
@@ -1126,7 +1131,7 @@ function settings_content(&$a) {
 
                '$h_basic'      => t('Basic Settings'),
                '$username' => array('username',  t('Full Name:'), $username,''),
-               '$email'        => array('email', t('Email Address:'), $email, ''),
+               '$email'        => array('email', t('Email Address:'), $email, '', '', '', 'email'),
                '$timezone' => array('timezone_select' , t('Your Timezone:'), select_timezone($timezone), ''),
                '$defloc'       => array('defloc', t('Default Post Location:'), $defloc, ''),
                '$allowloc' => array('allow_location', t('Use Browser Location:'), ($a->user['allow_location'] == 1), ''),