File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,8 @@ export class AccountsServer {
94
94
this . email = this . _options . sendMail
95
95
? { sendMail : this . _options . sendMail }
96
96
: new Email ( this . _options . email ) ;
97
- this . emailTemplates = emailTemplates ;
97
+
98
+ this . emailTemplates = this . _options . emailTemplates ;
98
99
99
100
if ( ! this . hooks ) {
100
101
this . hooks = new EventEmitter ( ) ;
@@ -300,6 +301,8 @@ export class AccountsServer {
300
301
proposedUserObject
301
302
) ;
302
303
304
+ // TODO: Send enrollment email if flag is on
305
+
303
306
return userId ;
304
307
} catch ( error ) {
305
308
this . hooks . emit ( ServerHooks . CreateUserError , error ) ;
Original file line number Diff line number Diff line change 8
8
config as sharedConfig ,
9
9
PasswordSignupFields ,
10
10
} from '@accounts/common' ;
11
- import { EmailTemplateType } from './email-templates' ;
11
+ import emailTemplates , { EmailTemplateType , EmailTemplatesType } from './email-templates' ;
12
12
13
13
export type PasswordAuthenticator = (
14
14
user : PasswordLoginUserType ,
@@ -55,6 +55,7 @@ export type AccountsServerConfiguration = AccountsCommonConfiguration & {
55
55
tokenConfigs ?: TokenConfig ;
56
56
passwordAuthenticator ?: PasswordAuthenticator ;
57
57
resumeSessionValidator ?: ResumeSessionValidator ;
58
+ emailTemplates ?: EmailTemplatesType ;
58
59
prepareMail ?: PrepareMailFunction ;
59
60
sendMail ?: SendMailFunction ;
60
61
// https://github.com/eleith/emailjs#emailserverconnectoptions
@@ -83,4 +84,5 @@ export default {
83
84
userObjectSanitizer : ( user : UserObjectType ) => user ,
84
85
allowedLoginFields : [ 'id' , 'email' , 'username' ] ,
85
86
emailTokensExpiry : 1000 * 3600 , // 1 hour in milis
87
+ emailTemplates
86
88
} ;
You can’t perform that action at this time.
0 commit comments