title: PFUser current User Parse
body: <p><strong>Edit</strong></p>
  
  <p>The code in question and 'this here ... because only by changing the parameters PfUser Current User in PfUser User, the app does not create problems ... I forgot to indicate the type of Crash ...</p>
  
  <pre><code>-(void) {RichiamaDatiInattesa
  
  
  PFQuery *EsamiInAttesa = [PFQuery queryWithClassName: @ "EsamiInAttesa"];
  
  [EsamiInAttesa whereKey: @ "user" equalTo: [PFUser currentUser]];** //This is the problem Crash "Equal To: [PFUser currentUser]
  
  [EsamiInAttesa countObjectsInBackgroundWithTarget: self selector: @ selector (countcallback: error :)];}
  </code></pre>
  
  <p>This' crash that returns the Log</p>
  
  <p><strong>U 03/08/2013 00:04:10.650 [20120:907] <em></strong> Terminating app two to uncaught exception 'NSInvalidArgumentException', reason: 'Can not do a comparison for query type: (null)'
  <strong></em> First throw call stack:
  (0x31a703e7 0x3976b963 0x31a70307 0xcdb6b 0xbba53 0xa939d 0xa9117 0x3389e579 0x338ded59 0x338daaf5 0x3391c1e1 0x338df803 0x338d7833 0x3387fd1f 0x3387f7ad 0x3387f1ef 0x355975f7 0x35597227 0x31a453e7 0x31a4538b 0x31a4420f 0x319b723d 0x319b70c9 0x338d646d 0x338d32b9 0xa89bd 0x39b98b20)
  libc + + abi.dylib: terminate called throwing an exception</strong></p>
  
  <p>/////////////////////////////////////////////////////////////////////////////////////////</p>
  
  <p>I'm working PARSE (spectacular) but I can not figure out where I'm wrong because I continually from this CRASH .... : (</p>
  
  <p>Terminating apt two to uncaught exception 'NSInvalidArgumentException', reason: 'Can not do a comparison for query type: (null)'</p>
  
  <p>If I modify this query "equal to [PFUser current user] in [PFUser user] does not return the application problems and it works perfectly, except that when I open the application, the first page I need you to give me the values ​​of the current user and this is not 'possible if instead of current user only insert user ...</p>
  
  <p><strong>The problem occurs when I run the LOGOUT the time the user and try to log in again ... at this time the application CRASH ... Not even the screen displays PF Login</strong></p>
  
  <p>The code 'this, can you tell me where I'm wrong? thanks to all</p>
  
  <pre><code>- (void) {RichiamaDatiInattesa
      
  PFQuery EsamiInAttesa * = [PFQuery queryWithClassName: @ "EsamiInAttesa"];
       [EsamiInAttesa whereKey: @ "user" equalTo: [PFUser currentUser]];
       [EsamiInAttesa countObjectsInBackgroundWithTarget: self selector: @ selector (countcallback: error :)];
  }
  
  
  - (void) countcallback: (NSNumber *) count error: (NSError *) error {
       if (error) {
           self.DisplayNumero.text = [NSString stringWithFormat: @ "% d tests are currently pending," [count intValue]];
            
  
       Else {}
  
           self.DisplayNumero.text = [NSString stringWithFormat: @ "Connection Absent"];
          / * [[[UIAlertView alloc] initWithTitle: @ "Missing Information"
                                       message: @ "Make sure you fill out all of the information!"
                                      delegate: nil
                             cancelButtonTitle: @ "ok"
                             otherButtonTitles: nil] show]; * /
          }
  
      
  }
  </code></pre>