Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions login/createuser.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,19 @@
//Pull username, generate new ID and hash password
$newid = uniqid(rand(), false);
$newuser = $_POST['newuser'];
$newemail = $_POST['email'];
$newpw = password_hash($_POST['password1'], PASSWORD_DEFAULT);
$pw1 = $_POST['password1'];
$pw2 = $_POST['password2'];

//Enables moderator verification (overrides user self-verification emails)
//Enables moderator verification (overrides user self-verification emails)
if (isset($admin_email)) {

$newemail = $admin_email;
$activationemail = $admin_email;

} else {

$newemail = $_POST['email'];
$activationemail = $newemail;

}
//Validation rules
Expand Down Expand Up @@ -51,7 +52,7 @@

//Send verification email
$m = new MailSender;
$m->sendMail($newemail, $newuser, $newid, 'Verify');
$m->sendMail($activationemail, $newuser, $newid, 'Verify');

} else {
//Failure
Expand Down