2
change (in register.php)
$user_mailok = (isset($_POST['user_mailok']) && intval($_POST['user_mailok'])) ? 0 : 1;
to
$user_mailok = (isset($_POST['user_mailok']) && intval($_POST['user_mailok'])) ? 1 : 0;
that will make it default to yes on the form.
if you want to make it permanently select yes and remove the field. then change (in register.php)
$newuser->setVar('user_mailok',$user_mailok, true);
to
$newuser->setVar('user_mailok', 1, true);
you don't have to remove the field then. but if you want to remove the field anyway then change (in include/registerform.php)
$reg_form->addElement(new XoopsFormRadioYN(_US_MAILOK, 'user_mailok', $user_mailok));
to
// $reg_form->addElement(new XoopsFormRadioYN(_US_MAILOK, 'user_mailok', $user_mailok));