Skip to content

Commit

Permalink
Set password and password_reset on register
Browse files Browse the repository at this point in the history
  • Loading branch information
dbauszus-glx committed Mar 7, 2024
1 parent 7d030b7 commit bdd642b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mod/user/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ async function post(req, res) {
rows = await acl(`
INSERT INTO acl_schema.acl_table (
email,
password,
password_reset,
language,
${process.env.APPROVAL_EXPIRY ? 'expires_on,' : ''}
Expand All @@ -174,6 +175,7 @@ async function post(req, res) {
SELECT
'${req.body.email}' AS email,
'${password}' AS password,
'${password}' AS password_reset,
'${language}' AS language,
${process.env.APPROVAL_EXPIRY ? `${parseInt((new Date().getTime() + process.env.APPROVAL_EXPIRY * 1000 * 60 * 60 * 24)/1000)} AS expires_on,` : ''}
Expand Down

0 comments on commit bdd642b

Please sign in to comment.