no message
This commit is contained in:
1 parent
df529258e0
commit
3165e2eef8
48 files changed
+3757
-1799
No files matched your search
@@ -23,7 +23,8 @@
|
||||
@property (nonatomic) BOOL hasVerifiedEmail;
|
||||
@property (nonatomic, strong) NSDate *emailVerifiedDate;
|
||||
@property (nonatomic, strong) NSString *email;
|
||||
@property (strong, nonatomic) NSString *username;
|
||||
@property (nonatomic, strong) NSString *username;
|
||||
@property (nonatomic, strong) NSString *password;
|
||||
@property (nonatomic) BOOL publicProfile;
|
||||
@property (nonatomic) NSInteger loginCount;
|
||||
@property (strong, nonatomic) NSDate *createdAt;
|
||||
@@ -38,4 +39,8 @@
|
||||
*/
|
||||
+ (instancetype) currentUser;
|
||||
|
||||
- (BOOL) isValidPassword:(NSString* _Nonnull) password;
|
||||
|
||||
- (void) setPassword:(NSString * _Nonnull)password withBlock:(id _Nonnull) object inBackGroundWithBlock:(nullable void (^)(BOOL saveStatus, id _Nullable responseObject, NSError * _Nullable error)) responseBlock;
|
||||
|
||||
@end
|
||||
@@ -7,6 +7,9 @@
|
||||
//
|
||||
|
||||
#import "PNUser.h"
|
||||
#import "NSString+Helper.h"
|
||||
#import "PNObjectConstants.h"
|
||||
|
||||
|
||||
@interface PNUser() <PNObjectSubclassing>
|
||||
|
||||
@@ -78,7 +81,30 @@ static bool isFirstAccess = YES;
|
||||
}
|
||||
|
||||
- (void) setEmail:(NSString *)email {
|
||||
|
||||
if ([email isValidEmail]) {
|
||||
_email = email;
|
||||
}
|
||||
NSLogDebug(@"insertedEmail is not valid.");
|
||||
}
|
||||
|
||||
- (void) setPassword:(NSString *)password {
|
||||
if ([password length] >= [[PNObjectConfig sharedInstance] minPasswordLenght]) {
|
||||
self.password = password;
|
||||
}
|
||||
NSLogDebug(@"Inserted Passord is not valid.Lenght must be >= %ld",(long)[[PNObjectConfig sharedInstance] minPasswordLenght]);
|
||||
}
|
||||
|
||||
|
||||
- (BOOL) isValidPassword:(NSString* _Nonnull) password {
|
||||
if ([password length] >= [[PNObjectConfig sharedInstance] minPasswordLenght]) {
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
|
||||
- (NSString *) password {
|
||||
return @"password is not readble";
|
||||
}
|
||||
|
||||
#pragma mark PNObjectSubclassing Protocol
|
||||
@@ -92,6 +118,7 @@ static bool isFirstAccess = YES;
|
||||
@"sex":@"sex",
|
||||
@"birthDate":@"birthDate",
|
||||
@"phone":@"phone",
|
||||
@"password":@"password",
|
||||
@"hasAcceptedPrivacy":@"hasAcceptedPrivacy",
|
||||
@"hasAcceptedNewsletter":@"hasAcceptedNewsletter",
|
||||
@"hasVerifiedEmail":@"hasVerifiedEmail",
|
||||
|
||||
Reference in new issue
Block a user