Fix in createmailuser.php wenn kein forcepwreset angegeben wurde

This commit is contained in:
Humorhenker 2019-11-26 20:10:50 +01:00
parent 6ae3acaad4
commit 9293474d9d
1 changed files with 5 additions and 3 deletions

View File

@ -139,13 +139,15 @@ function createmailuser($newmailusername, $newmaildomainid, $newmailpw, $newmail
session_start();
if ($_SESSION['log'] == 1 AND $_SESSION['admin'] == 1) {
//print_r($_POST);
createmailuser($_POST['newmailusername'], $_POST['newmaildomainid'], $_POST['newmailpw'], $_POST['newmailpwrep'], $_POST['forcepwreset'], 1);
if (!isset($_POST['forcepwreset'])) $newmailforcepwreset = 0;
else $newmailforcepwreset = $_POST['forcepwreset'];
createmailuser($_POST['newmailusername'], $_POST['newmaildomainid'], $_POST['newmailpw'], $_POST['newmailpwrep'], $newmailforcepwreset, 1);
header("Location: ../admin.php");
exit;
}
if ($config['allowregistration']) {
if ($_POST['captchacode'] == $_SESSION['captchacode']) {
createmailuser($_POST['newmailusername'], $_POST['newmaildomainid'], $_POST['newmailpw'], $_POST['newmailpwrep'], $_POST['forcepwreset'], 0);
createmailuser($_POST['newmailusername'], $_POST['newmaildomainid'], $_POST['newmailpw'], $_POST['newmailpwrep'], 0, 0);
}
elseif ($_POST['captchacode'] != $_SESSION['captchacode']) {
header("Location: createmailpre.php?wrongcaptchacode=1");