upd: handle email signups properly with approval enabled
This commit is contained in:
parent
3f0cc256dc
commit
32fc540df4
3 changed files with 15 additions and 4 deletions
|
@ -277,10 +277,14 @@ export class SignupApiService {
|
|||
pendingUserId: null,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
if (instance.approvalRequiredForSignup) {
|
||||
reply.code(204);
|
||||
return;
|
||||
if (pendingUser.email) {
|
||||
this.emailService.sendEmail(pendingUser.email, 'Approval pending',
|
||||
'Congratulations! Your account is now pending approval. You will get notified when you have been accepted.',
|
||||
'Congratulations! Your account is now pending approval. You will get notified when you have been accepted.');
|
||||
}
|
||||
return { pendingApproval: true };
|
||||
}
|
||||
|
||||
return this.signinService.signin(request, reply, account as MiLocalUser);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue