- set_pconfig(local_user(),'xmpp','enabled',intval($_POST['xmpp_enabled']));
- set_pconfig(local_user(),'xmpp','individual',intval($_POST['xmpp_individual']));
- set_pconfig(local_user(),'xmpp','bosh_proxy',$_POST['xmpp_bosh_proxy']);
+ }
+
+ PConfig::set(local_user(), 'xmpp', 'enabled', defaults($_POST, 'xmpp_enabled', false));
+ PConfig::set(local_user(), 'xmpp', 'individual', defaults($_POST, 'xmpp_individual', false));
+ PConfig::set(local_user(), 'xmpp', 'bosh_proxy', defaults($_POST, 'xmpp_bosh_proxy', ''));