25 if (!
$GLOBALS[
'xoopsUser'] ||
$GLOBALS[
'xoopsConfigUser'][
'allow_chgmail'] != 1) {
30 include
$GLOBALS[
'xoops']->path(
'header.php');
32 if (!isset(
$_POST[
'submit']) || !isset(
$_POST[
'passwd'])) {
34 include_once
$GLOBALS[
'xoops']->path(
'class/xoopsformloader.php');
45 if (md5(
$pass) !=
$GLOBALS[
'xoopsUser']->getVar(
'pass',
'n')) {
53 $msg = implode(
'<br />', $errros);
64 $xoopsMailer->useMail();
65 $xoopsMailer->setTemplateDir(
$GLOBALS[
'xoopsModule']->getVar(
'dirname',
'n'));
66 $xoopsMailer->setTemplate(
'emailchanged.tpl');
67 $xoopsMailer->assign(
"SITENAME",
$GLOBALS[
'xoopsConfig'][
'sitename']);
68 $xoopsMailer->assign(
"ADMINMAIL",
$GLOBALS[
'xoopsConfig'][
'adminmail']);
69 $xoopsMailer->assign(
"SITEURL", XOOPS_URL .
"/");
70 $xoopsMailer->assign(
"NEWEMAIL",
$email);
71 $xoopsMailer->setToEmails(
$email);
72 $xoopsMailer->setFromEmail(
$GLOBALS[
'xoopsConfig'][
'adminmail']);
73 $xoopsMailer->setFromName(
$GLOBALS[
'xoopsConfig'][
'sitename']);
78 $msg = implode(
'<br />',
$GLOBALS[
'xoopsUser']->getErrors() );