Fixed issue with login-in

This commit is contained in:
Kasper Rynning-Tønnesen
2018-03-13 17:55:56 +01:00
parent eb69e1e67b
commit ed38c213ac
3 changed files with 4 additions and 3 deletions

View File

@@ -42,7 +42,7 @@ function password(inp, coll, guid, offline, socket) {
{
Functions.setSessionAdminPass(sessionId, inp.password, coll, function() {
db.collection(coll + "_settings").update({ id: "config" }, {$set:{adminpass:Functions.hash_pass(pw)}}, function(err, docs){
if(adminpass != pw) {
if(adminpass != pw && adminpass != "") {
socket.emit("toast", "changedpass");
} else {
socket.emit("toast", "correctpass");