| Re: Manditory fields for user registration? |
| by Anonymous on 2008/5/29 0:10:03 use smartprofile module or you need to hack register.php file. For example: How to make Name field as required ? Edit register.php then add: le="color: #000000"><?php $name = isset($_POST['name']) ? $myts->stripSlashesGPC($_POST['name']) : ''; before: le="color: #000000"><?php $uname = isset($_POST['uname']) ? $myts->stripSlashesGPC($_POST['uname']) : ''; and add: le="color: #000000"><?php <input type='hidden' name='name' value='".$myts->htmlSpecialChars($name) ."' /> before: le="color: #000000"><?php <input type='hidden' name='uname' value='".$myts->htmlSpecialChars($uname)."' /> and add: le="color: #000000"><?php $newuser->setVar('name', $name, true); before: le="color: #000000"><?php $newuser->setVar('uname', $uname, true); Now edit include/registerform.php then add: le="color: #000000"><?php $reg_form->addElement(new XoopsFormText(_US_REALNAME, 'name', 30, 60, $myts->htmlSpecialChars($name)), true); before: le="color: #000000"><?php $uname_size = $xoopsConfigUser['maxuname'] < 25 ? $xoopsConfigUser['maxuname'] : 25; That's it! This hack based on autologin hack and working on 2.0.18.1 or older. |
| Manditory fields for user registration? |
| by antifmradio on 2008/5/28 23:09:17 Wanted to know if there is a way to make some of the fields MANDITORY for user registrations. |