Created
September 6, 2016 18:56
-
-
Save biagidp/c2cb6963546de559a9f289199d44424c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
logic.FindMatchingUser = function(NewUser, ExistingUsers, callback) | |
{ | |
//campare email to see if same user or not | |
console.log("Comparing"); | |
console.log(ExistingUsers); | |
//make sure this handles multiple possible matches\ | |
//for each | |
for(var i = 0; i < ExistingUsers.length; i++) | |
{ | |
var user = ExistingUsers[i]; | |
console.log(user.EmailAddress + "\n" + NewUser.EmailAddress); | |
if(NewUser.EmailAddress === user.EmailAddress) | |
{ | |
console.log(user); | |
callback(user); | |
} | |
} | |
callback(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment