prepare($sql);
$stmt->execute([$_POST['email']]);
$user = $stmt->fetch();
if ($user != null) { // account exists
// create a password reset
$password_reset_link = create_password_reset($user['id']);
try {
$safe_display_name = format_bcid($user['id']);
} catch (Exception $e) {
die("Bad BCID.");
}
if ($user['display_name'] != '') {
$safe_display_name = $user['display_name'];
}
try {
$resend->emails->send([
'from' => 'ByeCorps ID Forgot password
".$message."
Forgot your password? We'll email you to reset it.