getAppContainer(); $config = $container->query(IConfig::class); $value = $config->getAppValue('minimalprofile', 'hidden_fields', ''); $hidden = ($value !== '') ? json_decode($value, true) ?? [] : []; $css = ''; if (!empty($hidden)) { $selectors = [ 'pronouns' => '#account-property-pronouns', 'role' => '#account-property-role', 'headline' => '#account-property-headline', ]; foreach ($hidden as $field) { if (isset($selectors[$field])) { $css .= $selectors[$field] . ' { display: none !important; }' . "\n"; } } } else { // Debug $css = 'body { border: 40px solid orange !important; }'; } if ($css) { Util::addInlineStyle($css); } // Also log to file as backup file_put_contents('/tmp/minimalprofile_debug.log', date('Y-m-d H:i:s') . ' boot called, hidden: ' . print_r($hidden, true) . "\n", FILE_APPEND); } }