File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed
core/server/services/auth Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -82,16 +82,16 @@ async function doSettings(data, settingsAPI) {
82
82
return user ;
83
83
}
84
84
85
- function sendNotification ( setupUser , mailAPI ) {
86
- const data = {
87
- ownerEmail : setupUser . email
88
- } ;
89
-
85
+ function sendNotification ( email , mailAPI ) {
90
86
if ( config . get ( 'sendWelcomeEmail' ) ) {
87
+ const data = {
88
+ ownerEmail : email
89
+ } ;
90
+
91
91
return mail . utils . generateContent ( { data : data , template : 'welcome' } )
92
92
. then ( ( content ) => {
93
93
const message = {
94
- to : setupUser . email ,
94
+ to : email ,
95
95
subject : common . i18n . t ( 'common.api.authentication.mail.yourNewGhostBlog' ) ,
96
96
html : content . html ,
97
97
text : content . text
@@ -108,11 +108,8 @@ function sendNotification(setupUser, mailAPI) {
108
108
err . context = common . i18n . t ( 'errors.api.authentication.unableToSendWelcomeEmail' ) ;
109
109
common . logging . error ( err ) ;
110
110
} ) ;
111
- } )
112
- . return ( setupUser ) ;
111
+ } ) ;
113
112
}
114
-
115
- return setupUser ;
116
113
}
117
114
118
115
module . exports = {
You can’t perform that action at this time.
0 commit comments