File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed
Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -86,6 +86,9 @@ extern NSString *const PFUserCurrentUserKeychainItemName;
8686// TODO: (nlutsenko) Add Documentation
8787- (BFTask *)unlinkWithAuthTypeInBackground : (NSString *)authType ;
8888
89+ // TODO: (nlutsenko) Add Documentation
90+ - (BOOL )isLinkedWithAuthType : (NSString *)authType ;
91+
8992// /--------------------------------------
9093// / @name Authentication Providers (Private)
9194// /--------------------------------------
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ + (void)logInWithTarget:(id)target selector:(SEL)selector {
4242// /--------------------------------------
4343
4444+ (BOOL )isLinkedWithUser : (PFUser *)user {
45- return [user.linkedServiceNames containsObject : [[[self _authenticationProvider ] class ] authType ]];
45+ return [user isLinkedWithAuthType : [[[self _authenticationProvider ] class ] authType ]];
4646}
4747
4848// /--------------------------------------
Original file line number Diff line number Diff line change @@ -891,6 +891,15 @@ - (BFTask *)unlinkWithAuthTypeInBackground:(NSString *)authType {
891891 return save;
892892}
893893
894+ #pragma mark Linked
895+
896+ - (BOOL )isLinkedWithAuthType : (NSString *)authType {
897+ PFParameterAssert (authType, @" Authentication type can't be `nil`." );
898+ @synchronized (self.lock ) {
899+ return [self .linkedServiceNames containsObject: authType];
900+ }
901+ }
902+
894903#pragma mark Private
895904
896905+ (void )_unregisterAuthenticationProvider : (id <PFAuthenticationProvider>)provider {
You can’t perform that action at this time.
0 commit comments