set(local_user(), 'fromapp', 'app', $_POST['fromapp-input']);
DI::pConfig()->set(local_user(), 'fromapp', 'force', intval($_POST['fromapp-force']));
info(DI::l10n()->t('Fromapp settings updated.') . EOL);
}
function fromapp_settings(&$a, &$s)
{
if (!local_user()) {
return;
}
/* Add our stylesheet to the page so we can make our settings look nice */
DI::page()['htmlhead'] .= '' . "\r\n";
/* Get the current state of our config variable */
$fromapp = DI::pConfig()->get(local_user(), 'fromapp', 'app', '');
$force = intval(DI::pConfig()->get(local_user(), 'fromapp', 'force'));
$force_enabled = (($force) ? ' checked="checked" ' : '');
/* Add some HTML to the existing form */
$s .= '';
$s .= '