1
johntrot
make real name variable and required
  • 2005/6/9 1:54

  • johntrot

  • Just popping in

  • Posts: 56

  • Since: 2005/4/7 2


I have viewed several threads concerning this issue and have changed the following to three files. There are no smarty problems but I can't get the variable 'rname' (realname) to work in the theme page, and I can't type the name in the registration form either. I would appreciate some help!

as you will notice, I used 'rname' rather than 'urname'


edited line in HEADER.PHP

$xoopsTpl->assign(array('xoops_isuser' => true, 'xoops_userid' => $xoopsUser->getVar('uid'), 'xoops_uname' => $xoopsUser->getVar('uname'),'xoops_rname' => $xoopsUser->getVar('rname'), 'xoops_isadmin' => $xoopsUserIsAdmin));


added or edited the following lines in REGISTER.PHP
the added lines were placed below the corresponding 'uname' lines.

edited line:
$stop .= userCheck($uname, $rname, $email, $pass, $vpass);

added lines:
$rname = isset($_POST['rname']) ? $myts->stripSlashesGPC($_POST['rname']) : '';

echo _US_REALNAME.": ".$myts->htmlSpecialChars($rname)."
";



$newuser->setvar('rname', $rname, true);

$xoopsMailer->assign('REALNAME', $rname);



added the following line to: include/registerform.php

$reg_form->addElement(new XoopsFormText(_US_REALNAME, "rname", $rname_size, $rname_size, $myts->htmlSpecialChars($rname)), true);


Login

Who's Online

196 user(s) are online (100 user(s) are browsing Support Forums)


Members: 0


Guests: 196


more...

Donat-O-Meter

Stats
Goal: AU$15.00
Due Date: Jul 31
Gross Amount: AU$0.00
Net Balance: AU$0.00
Left to go: AU$15.00
Make donations with PayPal!

Latest GitHub Commits