Advertisement
Guest User

Untitled

a guest
Oct 12th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. private func fetchUser(withId uid: String) {
  2.  
  3. FIRDatabase.database().reference().child("users").child(uid).observeSingleEvent(of: .value, with: { (snapshot) in
  4.  
  5. if let dictionary = snapshot.value as? [String: AnyObject] {
  6. let user = User()
  7. user.name = dictionary["name"] as? String
  8. user.profileImageUrl = dictionary["profileImageURL"] as? String
  9. self.users.append(user)
  10. self.attemptReloadOfCollection()
  11. }
  12. }, withCancel: nil)
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement