public function findUser ($userId) {
    $query = $this->database->pdo->prepare('SELECT username, points FROM users WHERE userId = :userId');
    $query->bindParam(':userId', $userId);

    $query->execute();
    return (object) $query->fetch(PDO::FETCH_ASSOC);
  }
public function findUser ($userId) {
    $query = $this->database->pdo->prepare('SELECT username, points FROM users WHERE userId = :userId');
    $query->bindParam(':userId', $userId);

    $query->execute();
    return (object) $query->fetch(PDO::FETCH_ASSOC);
  }
public function findUser ( $ userId ) { $ query = $ this -> database -> pdo -> prepare ( 'SELECT username, points FROM users WHERE userId = :userId' ) ; $ query -> bindParam ( ':userId' , $ userId ) ; $ query -> execute ( ) ; return ( object ) $ query -> fetch ( PDO :: FETCH_ASSOC ) ; }
Find the user by her user ID.

@param $userId The user ID.
@return object The user found.
Find the user by her user ID .