Skip to content
Snippets Groups Projects
Commit 070643eb authored by Lloyd Hilaiel's avatar Lloyd Hilaiel
Browse files

update timestamp when replacing a record in the staged table. required for issue #430

parent c5684a06
No related branches found
No related tags found
No related merge requests found
......@@ -219,7 +219,7 @@ exports.stageUser = function(email, cb) {
var secret = secrets.generate(48);
// overwrite previously staged users
client.query('INSERT INTO staged (secret, new_acct, email) VALUES(?,TRUE,?) ' +
'ON DUPLICATE KEY UPDATE secret=?, existing="", new_acct=TRUE',
'ON DUPLICATE KEY UPDATE secret=?, existing="", new_acct=TRUE, ts=NOW()',
[ secret, email, secret],
function(err) {
if (err) {
......@@ -317,7 +317,7 @@ exports.stageEmail = function(existing_email, new_email, cb) {
var secret = secrets.generate(48);
// overwrite previously staged users
client.query('INSERT INTO staged (secret, new_acct, existing, email) VALUES(?,FALSE,?,?) ' +
'ON DUPLICATE KEY UPDATE secret=?, existing=?, new_acct=FALSE',
'ON DUPLICATE KEY UPDATE secret=?, existing=?, new_acct=FALSE, ts=NOW()',
[ secret, existing_email, new_email, secret, existing_email],
function(err) {
if (err) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment