mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 04:10:32 +00:00
fix: the email confirmation link on mail message
This commit is contained in:
@@ -44,8 +44,10 @@ export default class AuthenticationMailMesssages {
|
|||||||
public async sendSignupVerificationMail(
|
public async sendSignupVerificationMail(
|
||||||
email: string,
|
email: string,
|
||||||
fullName: string,
|
fullName: string,
|
||||||
token: string,
|
token: string
|
||||||
) {
|
) {
|
||||||
|
const verifyUrl = `${config.baseURL}/auth/email_confirmation?token=${token}&email=${email}`;
|
||||||
|
|
||||||
await new Mail()
|
await new Mail()
|
||||||
.setSubject('Bigcapital - Verify your email')
|
.setSubject('Bigcapital - Verify your email')
|
||||||
.setView('mail/SignupVerifyEmail.html')
|
.setView('mail/SignupVerifyEmail.html')
|
||||||
@@ -57,10 +59,7 @@ export default class AuthenticationMailMesssages {
|
|||||||
cid: 'bigcapital_logo',
|
cid: 'bigcapital_logo',
|
||||||
},
|
},
|
||||||
])
|
])
|
||||||
.setData({
|
.setData({ verifyUrl, fullName })
|
||||||
verifyUrl: `${config.baseURL}/auth/reset_password/${token}`,
|
.send();
|
||||||
fullName,
|
|
||||||
})
|
|
||||||
.send();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
exports.up = function (knex) {
|
exports.up = function (knex) {
|
||||||
return knex.schema.table('users', (table) => {
|
return knex.schema
|
||||||
table.string('verify_token');
|
.table('users', (table) => {
|
||||||
table.boolean('verified').defaultTo(false);
|
table.string('verify_token');
|
||||||
});
|
table.boolean('verified').defaultTo(false);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
return knex('USERS').update({ verified: true });
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.down = (knex) => {};
|
exports.down = (knex) => {};
|
||||||
|
|||||||
Reference in New Issue
Block a user