How can I make real name a required field for user registration?

Requested by Siweb and Answered by Alanuk on 2005/5/15 8:25:25

How can I make real name a required field for user registration?

For XOOPS 2.0.10 change following: include/registerform.php After line 69

$reg_form->addElement(new XoopsFormText(_US_NICKNAME, "uname", $uname_size, $uname_size, $myts->htmlSpecialChars($uname)), true);
insert
$reg_form->addElement(new XoopsFormText(_US_REALNAME, "name", 26, 25, $myts->htmlSpecialChars($name)), true);
register.php After line 59
$uname = xoops_trim($uname);
insert
$name= xoops_trim($name);
After line 143
echo _US_USERNAME.": ".$myts->htmlSpecialChars($uname)."<br />";
insert
echo _US_REALNAME.": ".$myts->htmlSpecialChars($name)."<br />";
After line 153
<input type='hidden' name='uname' value='".$myts->htmlSpecialChars($uname)."' />
insert
<input type='hidden' name='name' value='".$myts->htmlSpecialChars($name)."'/>
After line 183
$newuser->setVar('uname', $uname, true);
insert
$newuser->setVar('name', $name, true);
--- Additional details submitted by Alanuk on 2006/2/23 13:26:53 I think there is a line missing in register.php: After line 119 $uname = isset($_POST['uname']) ? $myts->stripSlashesGPC($_POST['uname']) : ''; insert $name = isset($_POST['name']) ? $myts->stripSlashesGPC($_POST['name']) : ''; Without this, the user's real name is not posted to the database.

This Q&A was found on XOOPS Web Application System : https://xoops.org/modules/smartfaq/faq.php?faqid=478