From 0bcf784a8c544f4e08b88947cbda1b9ced1cc55b Mon Sep 17 00:00:00 2001
From: Lloyd Hilaiel <lloyd@hilaiel.com>
Date: Mon, 14 Nov 2011 13:51:11 -0700
Subject: [PATCH] fix a bug in json.js db impl, re-read database from disk
 before responding to emailForVerificationSecret()

---
 lib/db/json.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/db/json.js b/lib/db/json.js
index 5305f0a2d..d4efbf5e9 100644
--- a/lib/db/json.js
+++ b/lib/db/json.js
@@ -208,6 +208,7 @@ exports.stageEmail = function(existing_email, new_email, cb) {
 
 
 exports.emailForVerificationSecret = function(secret, cb) {
+  sync();
   setTimeout(function() {
     cb(db.staged[secret] ? db.staged[secret].email : undefined);
   }, 0);
-- 
GitLab