function updateAllUsersToDBSantaNames(){
        for(var i = 0; i < userArr.length; i++) {
            if (userArr[i].secretSantaName != undefined) {
                firebase.database().ref("users/" + userArr[i].uid).update({
                    secretSantaName: userArr[i].secretSantaName
                });
            } else {
                console.log("Failed To Update Name " + userArr[i].name);
            }
        }
    }
//This function updates all the users Secret Santa names to the database
This function updates all the users Secret Santa names to the database
This function updates all the users Secret Santa names to the database
function updateAllUsersToDBSantaNames(){
        for(var i = 0; i < userArr.length; i++) {
            if (userArr[i].secretSantaName != undefined) {
                firebase.database().ref("users/" + userArr[i].uid).update({
                    secretSantaName: userArr[i].secretSantaName
                });
            } else {
                console.log("Failed To Update Name " + userArr[i].name);
            }
        }
    }
function updateAllUsersToDBSantaNames ( ) { for ( var i = 0 ; i < userArr . length ; i ++ ) { if ( userArr [ i ] . secretSantaName != undefined ) { firebase . database ( ) . ref ( "users/" + userArr [ i ] . uid ) . update ( { secretSantaName : userArr [ i ] . secretSantaName } ) ; } else { console . log ( "Failed To Update Name " + userArr [ i ] . name ) ; } } }
This function updates all the users Secret Santa names to the database
This function updates all the users Secret Santa names to the database