Advertisement
Guest User

Untitled

a guest
Nov 19th, 2016
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function saveToFB(gamename,date,time,description, email) {
  2.     //loguje usera na sztywno
  3.     var auth = firebase.auth();
  4.     var email = "a@a.com"
  5.     var pass = "aaaaaa"
  6.     auth.signInWithEmailAndPassword(email, pass);
  7.    
  8.     //pobieram info o zalogowanym userze
  9.     var user = firebase.auth().currentUser;
  10.     if (user) {
  11.     var email = user.email;
  12. } else {
  13.   email = "brak";
  14. }
  15.     // this will save data to Firebase
  16.     gamesRoot.push({
  17.         gamename: gamename,
  18.         date: date,
  19.         time: time,
  20.         description: description,
  21.         email: email
  22.     });
  23. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement