Disabling account e-mail fields if e-mail service is disabled (verification e-mail couldn't be sent).

This commit is contained in:
2026-07-22 05:59:11 +02:00
parent dbe27d68d3
commit 753840f4f1
3 changed files with 21 additions and 2 deletions

View File

@@ -91,6 +91,10 @@ async function hashPassword(password) {
}
export async function sendEmailVerification(user, customEmail, trigger) {
if (!config.email.enabled) {
throw new HttpError('E-mail verification is disabled', 503);
}
if (!user) {
throw new HttpError('No user provided', 401);
}