Skip to content
Snippets Groups Projects
Commit d2b5c21f authored by Sebastian Mihalache's avatar Sebastian Mihalache
Browse files

fix(components-faraday): add isActive to new users

parent 5c32f1b3
No related branches found
No related tags found
1 merge request!34Sprint 17 features
const config = require('config')
const helpers = require('./helpers')
const SendEmail = require('@pubsweet/component-send-email')
const logger = require('@pubsweet/logger')
class Email {
constructor({
......@@ -64,14 +65,20 @@ class Email {
}
sendEmail({ text, html }) {
const fromEmail = config.get('mailer.from')
const mailData = {
from: config.get('mailer.from'),
from: fromEmail,
to: this.toUser.email,
subject: this.content.subject,
text,
html,
}
logger.info(
`INFO: Sent email from ${fromEmail} to ${
this.toUser.email
} with subject ${this.content.subject}`,
)
SendEmail.send(mailData)
}
}
......
......@@ -15,6 +15,7 @@ const generatePasswordHash = () =>
export const parseSignupAuthor = ({ token, confirmPassword, ...values }) => ({
...values,
admin: false,
isActive: true,
isConfirmed: false,
editorInChief: false,
handlingEditor: false,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment