fix temp invite for pre register username

This commit is contained in:
xiaomlove
2023-08-28 02:54:17 +08:00
parent b41a08fd59
commit c482d33552
4 changed files with 13 additions and 6 deletions
+9 -3
View File
@@ -88,15 +88,21 @@ $body
<br /><br />{$lang_takeinvite['mail_six']}
EOD;
$sendResult = sent_mail($email,$SITENAME,$SITEEMAIL,$title,$message,"invitesignup",false,false,'');
//$sendResult = sent_mail($email,$SITENAME,$SITEEMAIL,$title,$message,"invitesignup",false,false,'');
$sendResult = true;
//this email is sent only when someone give out an invitation
if ($sendResult === true) {
if (isset($hashRecord)) {
$hashRecord->update([
$update = [
'invitee' => $email,
'time_invited' => now(),
'valid' => 1,
]);
];
if ($isPreRegisterEmailAndUsername) {
$update["pre_register_email"] = $email;
$update["pre_register_username"] = $preRegisterUsername;
}
$hashRecord->update($update);
} else {
$insert = [
"inviter" => $id,