Advertisement
Guest User

Untitled

a guest
Aug 13th, 2016
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. if PFUser.currentUser() != nil {
  2.  
  3. }
  4.  
  5. let user = PFUser()
  6. user.username = "USERNAME"
  7. user.password = "PASSWORD"
  8. user.email = "EMAIL"
  9. // add more fields
  10.  
  11. user.signUpInBackgroundWithBlock {
  12. (succeeded: Bool, error: NSError?) -> Void in
  13.  
  14. if succeeded {
  15. // here the current user should not be nil.
  16. // if it is then please check for sessionToken
  17. if PFUser.currentUser() != nil {
  18. // user is logged in
  19. }
  20. }
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement