File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,13 @@ typedef void(^PFUserLogoutResultBlock)(NSError *_Nullable error);
4545 */
4646+ (nullable instancetype )currentUser ;
4747
48+ /* *
49+ *Asynchronously* loads the currently logged in user from disk and returns a task that encapsulates it.
50+
51+ @return The task that encapsulates the work being done.
52+ */
53+ + (BFTask<__kindof PFUser *> *)getCurrentUserInBackground ;
54+
4855/* *
4956 The session token for the `PFUser`.
5057
Original file line number Diff line number Diff line change @@ -780,8 +780,11 @@ + (NSString *)parseClassName {
780780}
781781
782782+ (instancetype )currentUser {
783- PFCurrentUserController *controller = [[self class ] currentUserController ];
784- return [[controller getCurrentObjectAsync ] waitForResult: nil withMainThreadWarning: NO ];
783+ return [[self getCurrentUserInBackground ] waitForResult: nil withMainThreadWarning: NO ];
784+ }
785+
786+ + (BFTask<__kindof PFUser *> *)getCurrentUserInBackground {
787+ return [[[self class ] currentUserController ] getCurrentObjectAsync ];
785788}
786789
787790- (BOOL )_current {
You can’t perform that action at this time.
0 commit comments