From eb65c5ad1b515d7883c529a1388390985401ff8d Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Wed, 8 Jan 2014 21:47:09 -0500 Subject: [PATCH] reindex user name after change, #745 --- src/user.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/user.js b/src/user.js index d45bc57b96..ffc8c05026 100644 --- a/src/user.js +++ b/src/user.js @@ -307,6 +307,9 @@ var bcrypt = require('bcrypt'), User.setUserField(uid, 'username', data.username); db.deleteObjectField('username:uid', userData.username); db.setObjectField('username:uid', data.username, uid); + db.searchRemove('user', uid, function() { + db.searchIndex('user', data.username, uid); + }); } if(userslug !== userData.userslug) {