From 8eb53aff09dcce1b14857f7e5d90249ecec16bba Mon Sep 17 00:00:00 2001 From: Roel Walraven Date: Thu, 4 Aug 2016 16:57:15 +0200 Subject: [PATCH] Fixes undefined user error aka fixing sloppy code... --- mock/LightDMMock.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mock/LightDMMock.js b/mock/LightDMMock.js index fffb0d9..16d927f 100644 --- a/mock/LightDMMock.js +++ b/mock/LightDMMock.js @@ -139,8 +139,8 @@ LightDMMock.prototype.authenticate = function(username) { var exists = false; - for(var i = 0; i <= this.users.length; i++) { - if(this.users.name === username) + for(var i = 0; i <= this.users.length -1; i++) { + if(this.users[i].name === username) exists = true; }