function manuallyOptInOut(userData){
    if (userData.secretSanta != null) {
        if (userData.secretSanta == 0) {
            firebase.database().ref("users/" + userData.uid).update({
                secretSanta: 1
            });
            alert(userData.name + " has been manually opted in to the Secret Santa Program!");
        } else {
            firebase.database().ref("users/" + userData.uid).update({
                secretSanta: 0
            });
            alert(userData.name + " has been manually opted out of the Secret Santa Program!");
        }
    } else {
        firebase.database().ref("users/" + userData.uid).update({
            secretSanta: 0
        });
        alert(userData.name + " has been manually opted out of the Secret Santa Program!");
    }
}
//This function manually opts in users to the Secret Santa system
This function manually opts in users to the Secret Santa system
This function manually opts in users to the Secret Santa system
function manuallyOptInOut(userData){
    if (userData.secretSanta != null) {
        if (userData.secretSanta == 0) {
            firebase.database().ref("users/" + userData.uid).update({
                secretSanta: 1
            });
            alert(userData.name + " has been manually opted in to the Secret Santa Program!");
        } else {
            firebase.database().ref("users/" + userData.uid).update({
                secretSanta: 0
            });
            alert(userData.name + " has been manually opted out of the Secret Santa Program!");
        }
    } else {
        firebase.database().ref("users/" + userData.uid).update({
            secretSanta: 0
        });
        alert(userData.name + " has been manually opted out of the Secret Santa Program!");
    }
}
function manuallyOptInOut ( userData ) { if ( userData . secretSanta != null ) { if ( userData . secretSanta == 0 ) { firebase . database ( ) . ref ( "users/" + userData . uid ) . update ( { secretSanta : 1 } ) ; alert ( userData . name + " has been manually opted in to the Secret Santa Program!" ) ; } else { firebase . database ( ) . ref ( "users/" + userData . uid ) . update ( { secretSanta : 0 } ) ; alert ( userData . name + " has been manually opted out of the Secret Santa Program!" ) ; } } else { firebase . database ( ) . ref ( "users/" + userData . uid ) . update ( { secretSanta : 0 } ) ; alert ( userData . name + " has been manually opted out of the Secret Santa Program!" ) ; } }
This function manually opts in users to the Secret Santa system
This function manually opts in users to the Secret Santa system