44 $GLOBALS[
'xoopsLogger']->addDeprecated(
"Function " . __FUNCTION__ .
" is deprecated, use XoopsUserUtility::validate() instead");
62 include
$GLOBALS[
'xoops']->path(
'header.php');
64 if (!
$GLOBALS[
'xoopsSecurity']->check()) {
65 $stop .= implode(
'<br />',
$GLOBALS[
'xoopsSecurity']->getErrors()) .
"<br />";
82 echo
"<form action='register.php' method='post'>";
85 echo
"<br />" . $cpatcha->getCaption() .
": " . $cpatcha->render();
86 echo
"<input type='hidden' name='uname' value='" .
$myts->htmlSpecialChars(
$uname) .
"' />
87 <input type='hidden' name='email' value='" .
$myts->htmlSpecialChars(
$email) .
"' />
88 <input type='hidden' name='user_viewemail' value='" .
$user_viewemail .
"' />
89 <input type='hidden' name='timezone_offset' value='" . (float)
$timezone_offset .
"' />
90 <input type='hidden' name='url' value='" .
$myts->htmlSpecialChars(
$url) .
"' />
91 <input type='hidden' name='pass' value='" .
$myts->htmlSpecialChars(
$pass) .
"' />
92 <input type='hidden' name='vpass' value='" .
$myts->htmlSpecialChars(
$vpass) .
"' />
93 <input type='hidden' name='user_mailok' value='" .
$user_mailok .
"' />
94 <br /><br /><input type='hidden' name='op' value='finish' />"
95 .
$GLOBALS[
'xoopsSecurity']->getTokenHTML()
96 .
"<input type='submit' value='" .
_US_FINISH .
"' /></form>";
98 echo
"<span class='red'>$stop</span>";
99 include
$GLOBALS[
'xoops']->path(
'include/registerform.php');
102 include
$GLOBALS[
'xoops']->path(
'footer.php');
106 include
$GLOBALS[
'xoops']->path(
'header.php');
108 if (!
$GLOBALS[
'xoopsSecurity']->check()) {
109 $stop .= implode(
'<br />',
$GLOBALS[
'xoopsSecurity']->getErrors()) .
"<br />";
113 if (!$xoopsCaptcha->verify()) {
114 $stop .= $xoopsCaptcha->getMessage() .
"<br />";
120 $newuser->setVar(
'uname',
$uname,
true);
121 $newuser->setVar(
'email',
$email,
true);
125 $newuser->setVar(
'user_avatar',
'avatars/blank.gif',
true);
126 $actkey = substr(md5(uniqid(mt_rand(), 1)), 0, 8);
127 $newuser->setVar(
'actkey', $actkey,
true);
128 $newuser->setVar(
'pass', md5(
$pass),
true);
130 $newuser->setVar(
'user_regdate', time(),
true);
131 $newuser->setVar(
'uorder',
$GLOBALS[
'xoopsConfig'][
'com_order'],
true);
132 $newuser->setVar(
'umode',
$GLOBALS[
'xoopsConfig'][
'com_mode'],
true);
133 $newuser->setVar(
'theme',
$GLOBALS[
'xoopsConfig'][
'theme_set'],
true);
136 $newuser->setVar(
'level', 1,
true);
138 $newuser->setVar(
'level', 0,
true);
142 include
$GLOBALS[
'xoops']->path(
'footer.php');
145 $newid = $newuser->getVar(
'uid');
148 include
$GLOBALS[
'xoops']->path(
'footer.php');
159 $xoopsMailer->useMail();
160 $xoopsMailer->setTemplate(
'register.tpl');
161 $xoopsMailer->assign(
'SITENAME',
$xoopsConfig[
'sitename']);
162 $xoopsMailer->assign(
'ADMINMAIL',
$xoopsConfig[
'adminmail']);
163 $xoopsMailer->assign(
'SITEURL', XOOPS_URL .
"/");
164 $xoopsMailer->setToUsers(
new XoopsUser($newid));
168 if (! $xoopsMailer->send()) {
176 $xoopsMailer->useMail();
177 $xoopsMailer->setTemplate(
'adminactivate.tpl');
178 $xoopsMailer->assign(
'USERNAME',
$uname);
179 $xoopsMailer->assign(
'USEREMAIL',
$email);
180 $xoopsMailer->assign(
'USERACTLINK', XOOPS_URL .
'/register.php?op=actv&id=' . $newid .
'&actkey=' . $actkey);
181 $xoopsMailer->assign(
'SITENAME',
$xoopsConfig[
'sitename']);
182 $xoopsMailer->assign(
'ADMINMAIL',
$xoopsConfig[
'adminmail']);
183 $xoopsMailer->assign(
'SITEURL', XOOPS_URL .
"/");
189 if (! $xoopsMailer->send()) {
197 $xoopsMailer->reset();
198 $xoopsMailer->useMail();
205 $xoopsMailer->send();
208 echo
"<span class='red bold'>{$stop}</span>";
209 include
$GLOBALS[
'xoops']->path(
'include/registerform.php');
212 include
$GLOBALS[
'xoops']->path(
'footer.php');
217 $id = intval(
$_GET[
'id']);
218 $actkey = trim(
$_GET[
'actkey']);
225 if (!is_object($thisuser)) {
228 if ($thisuser->getVar(
'actkey') != $actkey) {
231 if ($thisuser->getVar(
'level') > 0) {
240 $xoopsMailer->useMail();
241 $xoopsMailer->setTemplate(
'activated.tpl');
242 $xoopsMailer->assign(
'SITENAME',
$xoopsConfig[
'sitename']);
243 $xoopsMailer->assign(
'ADMINMAIL',
$xoopsConfig[
'adminmail']);
244 $xoopsMailer->assign(
'SITEURL', XOOPS_URL .
"/");
245 $xoopsMailer->setToUsers($thisuser);
249 include
$GLOBALS[
'xoops']->path(
'header.php');
250 if (!$xoopsMailer->send()) {
255 include
$GLOBALS[
'xoops']->path(
'footer.php');
269 include
$GLOBALS[
'xoops']->path(
'header.php');
272 include
$GLOBALS[
'xoops']->path(
'include/registerform.php');
274 include
$GLOBALS[
'xoops']->path(
'footer.php');