title: Parse check if user already exist
body: <p>I already made reseting password, but still need something more. I mean that if user add an email to text field and push button send, he gets back alert if it is equal to username on Parse. If not, show alert that not. Any ideas?
  Thank you</p>
  
  <p><strong>ForgottenViewController.h</strong></p>
  
  <pre><code>-(IBAction)logoutPressed:(id)sender;
  
  @property(nonatomic, strong) IBOutlet UITextField *maill;
  @property (nonatomic, strong) IBOutlet UIActivityIndicatorView *activityLog;
  
  @end
  </code></pre>
  
  <p><strong>ForgottenViewController.m</strong></p>
  
  <pre><code>#import "ForgottenViewController.h"
  #import "SignUpViewController.h"
  
  @interface ForgottenViewController ()
  @end
  
  @implementation ForgottenViewController
  @synthesize maill;
  
  
  
  - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
      [self.view endEditing:YES];
  }
  
  - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
  {
      self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
      if (self) {
          // Custom initialization
      }
      return self;
  }
  
  - (void)viewDidLoad
  {
      [super viewDidLoad];
  
  
  }
  
  - (void)didReceiveMemoryWarning
  {
      [super didReceiveMemoryWarning];
      // Dispose of any resources that can be recreated.
  }
  
  
  
  
   -(IBAction)logoutPressed:(id)sender {
       PFQuery *query=[PFUser query];
       [query whereKey:@"username" equalTo:maill];
       [query getFirstObjectInBackgroundWithBlock:^(PFObject *object, NSError *error) {
           if (object) {
               NSString *myString = maill.text;
               [PFUser requestPasswordResetForEmailInBackground:myString];
               UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Great" message:@"Now check your email. You will be able to change your password right now." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
               [alert show];
               [_activityLog stopAnimating];
           }else{
               UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error" message:@"Sorry, but the email is not registred." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
               [alert show];
               [_activityLog stopAnimating];
           }
       }];}
  
  
  
  
  
  
  
  @end
  </code></pre>