LuxChat  2.0
Instant messenger for iOS
Instance Methods | Class Methods | List of all members
PFUser(Synchronous) Category Reference

#import <PFUser+Synchronous.h>

Instance Methods

(BOOL) - PF_SWIFT_UNAVAILABLE
 
More...
 
(BOOL) - signUp:
 

Class Methods

(nullable instancetype) + logInWithUsername:password:
 
More...
 
(nullable instancetype) + logInWithUsername:password:error:
 
(nullable instancetype) + become:
 
More...
 
(nullable instancetype) + become:error:
 
(void) + logOut
 
More...
 
(BOOL) + requestPasswordResetForEmail:
 
More...
 
(BOOL) + requestPasswordResetForEmail:error:
 

Detailed Description

Copyright (c) 2015-present, Parse, LLC. All rights reserved.

This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. An additional grant of patent rights can be found in the PATENTS file in the same directory. This category lists all methods of PFUser class that are synchronous, but have asynchronous counterpart, Calling one of these synchronous methods could potentially block the current thread for a large amount of time, since it might be fetching from network or saving/loading data from disk.

Method Documentation

+ (nullable instancetype) become: (NSString *)  PF_SWIFT_UNAVAILABLE



Makes a synchronous request to become a user with the given session token.

Returns an instance of the successfully logged in PFUser. This also caches the user locally so that calls to +currentUser will use the latest logged in user.

Parameters
sessionTokenThe session token for the user.
Returns
Returns an instance of the PFUser on success. If becoming a user fails due to incorrect token, it returns nil.
+ (nullable instancetype) become: (NSString *)  sessionToken
error: (NSError **)  error 

Makes a synchronous request to become a user with the given session token.

Returns an instance of the successfully logged in PFUser. This will also cache the user locally so that calls to +currentUser will use the latest logged in user.

Parameters
sessionTokenThe session token for the user.
errorThe error object to set on error.
Returns
Returns an instance of the PFUser on success. If becoming a user fails due to incorrect token, it returns nil.
+ (nullable instancetype) logInWithUsername: (NSString *)  username
password: (NSString *)  PF_SWIFT_UNAVAILABLE 



Makes a synchronous request to login a user with specified credentials.

Returns an instance of the successfully logged in PFUser. This also caches the user locally so that calls to +currentUser will use the latest logged in user.

Parameters
usernameThe username of the user.
passwordThe password of the user.
Returns
Returns an instance of the PFUser on success. If login failed for either wrong password or wrong username, returns nil.
+ (nullable instancetype) logInWithUsername: (NSString *)  username
password: (NSString *)  password
error: (NSError **)  error 

Makes a synchronous request to login a user with specified credentials.

Returns an instance of the successfully logged in PFUser. This also caches the user locally so that calls to +currentUser will use the latest logged in user.

Parameters
usernameThe username of the user.
passwordThe password of the user.
errorThe error object to set on error.
Returns
Returns an instance of the PFUser on success. If login failed for either wrong password or wrong username, returns nil.
+ (void) logOut



Synchronously* logs out the currently logged in user on disk.

- (BOOL) PF_SWIFT_UNAVAILABLE



Signs up the user synchronously.

This will also enforce that the username isn't already taken.

Warning
Make sure that password and username are set before calling this method.
Returns
Returns YES if the sign up was successful, otherwise NO.
+ (BOOL) requestPasswordResetForEmail: (NSString *)  PF_SWIFT_UNAVAILABLE



Synchronously* Send a password reset request for a specified email.

If a user account exists with that email, an email will be sent to that address with instructions on how to reset their password.

Parameters
emailEmail of the account to send a reset password request.
Returns
Returns YES if the reset email request is successful. NO - if no account was found for the email address.
+ (BOOL) requestPasswordResetForEmail: (NSString *)  email
error: (NSError **)  error 

Synchronously* send a password reset request for a specified email and sets an error object.

If a user account exists with that email, an email will be sent to that address with instructions on how to reset their password.

Parameters
emailEmail of the account to send a reset password request.
errorError object to set on error.
Returns
Returns YES if the reset email request is successful. NO - if no account was found for the email address.
- (BOOL) signUp: (NSError **)  error

Signs up the user synchronously.

This will also enforce that the username isn't already taken.

Warning
Make sure that password and username are set before calling this method.
Parameters
errorError object to set on error.
Returns
Returns whether the sign up was successful.

The documentation for this category was generated from the following file: