title: Parse: Remove user when session ends?
body: <p>I was wondering if it were possible to remove a user completely from the database if their session ends? Maybe in sign up, I can check if there is a session for the username the person is using and if there isn't, it deletes the previous user and registers a new one? </p>
  
  <p>How do I check if there is a current session for a certain username?</p>
  
  <p>UPDATE:</p>
  
  <pre><code>PFQuery *query = [PFQuery queryWithClassName:@"Friends"];
      [query whereKey:@"username" equalTo:[[PFUser currentUser] objectForKey:@"username"]];
      [query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
          for (Friends *currentFriend in objects) {
              [currentFriend deleteInBackground];
          }
      }];
  </code></pre>