Skip to content

Instantly share code, notes, and snippets.

View biagidp's full-sized avatar

David Biagi biagidp

View GitHub Profile
Logic.FindMatchingUser(User, data.data, function(matchingUser){
if(matchingUser)
{
Logs.appendEventLog("Match Found");
console.log("Match Found");
//compare attributes and run update to update
User["Id"] = matchingUser.Id;
if(Logic.CompareUsers(User, matchingUser) == true)
{
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];