- ADD isFacebookUser
- MOD isFacebookUser Property to facebookUser
This commit is contained in:
parent
a62ec71f98
commit
531bd9966a
@ -8,7 +8,7 @@
|
||||
|
||||
Pod::Spec.new do |s|
|
||||
s.name = "PNObject"
|
||||
s.version = "0.7.2"
|
||||
s.version = "0.7.3"
|
||||
s.summary = "PNObject is a simple replica of the more complex ParseObject"
|
||||
|
||||
# This description is used to generate tags and improve search results.
|
||||
|
||||
@ -122,6 +122,8 @@
|
||||
|
||||
- (UIImage* _Nonnull) userProfileImage:(BOOL) forceReload;
|
||||
|
||||
- (BOOL) isFacebookUser;
|
||||
|
||||
//- (void) setPassword:(NSString * _Nonnull)password inBackGroundWithBlock:(nullable void (^)(BOOL saveStatus, id responseObject, NSError * error)) responseBlock;
|
||||
|
||||
///--------------------------------------
|
||||
@ -200,10 +202,8 @@
|
||||
* <#Description#>
|
||||
*/
|
||||
@property (nonatomic, strong, nullable) NSNumber * loginCount;
|
||||
/**
|
||||
* <#Description#>
|
||||
*/
|
||||
@property (nonatomic) BOOL isFacebookUser;
|
||||
|
||||
@property (nonatomic) BOOL facebookUser;
|
||||
/**
|
||||
* <#Description#>
|
||||
*/
|
||||
|
||||
@ -154,6 +154,7 @@ static bool isFirstAccess = YES;
|
||||
NSLogDebug(@"%@",[responseObject objectForKey:@"user"]);
|
||||
|
||||
[[[self class] currentUser] populateObjectFromJSON:[responseObject objectForKey:@"user"]];
|
||||
[[[self class] currentUser] updateFacebookData];
|
||||
[[[self class] currentUser] saveLocally];
|
||||
[[NSNotificationCenter defaultCenter] postNotificationName:PNObjectLocalNotificationUserReloadFromServerSuccess object:nil];
|
||||
|
||||
@ -234,6 +235,7 @@ static bool isFirstAccess = YES;
|
||||
|
||||
[user setFacebookId:[result objectForKey:@"id"]];
|
||||
[user setAuthenticated:YES];
|
||||
[user setFacebookUser:YES];
|
||||
[user saveLocally];
|
||||
[user reloadFormServer];
|
||||
|
||||
@ -343,6 +345,24 @@ static bool isFirstAccess = YES;
|
||||
return self.authenticated;
|
||||
}
|
||||
|
||||
- (BOOL) isFacebookUser {
|
||||
[self updateFacebookData];
|
||||
|
||||
return self.facebookUser;
|
||||
}
|
||||
|
||||
|
||||
- (void) updateFacebookData {
|
||||
|
||||
if (self.facebookId || self.facebookAccessToken) {
|
||||
self.facebookUser = YES;
|
||||
}
|
||||
else {
|
||||
self.facebookUser = NO;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (UIImage* _Nonnull) userProfileImage {
|
||||
return [self userProfileImage:NO];
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user