Disabling account e-mail fields if e-mail service is disabled (verification e-mail couldn't be sent).
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user