NetmeraUser Class Reference
| Inherits from | NSObject |
| Declared in | Netmera.h NetmeraUser.m |
Overview
NetmeraUser object is for managing users of the application. You can register, update, login users with this class.
Tasks
-
+ getCurrentUserReturns the current logged user. If no user logged in then it returns nil.
-
– registerWithError:Registers new user. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields. There are also optional name and surname fields.
-
– registerInBackgroundWithTarget:selector:Registers new user. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields. There are also optional name and surname fields.
-
– registerInBackgroundWithBlock:Registers new user in the background thread and executes the given callback block. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields. There are also optional name and surname fields.
-
– update:Updates user info. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields.
-
– updateInBackgroundWithTarget:selector:Updates user info. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields.
-
– updateInBackgroundWithBlock:Updates user info. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields.
-
+ loginWithEmail:andPassword:withError:Logs a user into the registered application. Email and password fields of user is used for this operation.
-
+ loginInBackgroundWithTarget:selector:withEmail:andPassword:Logs a user into the registered application. Email and password fields of user is used for this operation.
-
+ logoutUser logged out from the application.
-
– activateUserWithEmail:andError:Activates the registered User.
-
– deactivateUserWithEmail:andError:Deactivates the registered User
Class Methods
getCurrentUser
Returns the current logged user. If no user logged in then it returns nil.
+ (NetmeraUser *)getCurrentUserReturn Value
current user
Discussion
Returns the current logged user. If no user logged in then it returns nil.
Declared In
Netmera.hloginInBackgroundWithTarget:selector:withEmail:andPassword:
Logs a user into the registered application. Email and password fields of user is used for this operation.
+ (void)loginInBackgroundWithTarget:(id)target selector:(SEL)selector withEmail:(NSString *)email andPassword:(NSString *)passwordParameters
- target
The object to call selector on.
- selector
The selector to call. It should have the following signature: (void) callBackLoginWithError:(NSError )error withNetmeraUser:(NetmeraUser )user. error will be nil on success and set if there was an error.
of the user
- password
of the user
Discussion
Logs a user into the registered application. Email and password fields of user is used for this operation.
Declared In
Netmera.hloginWithEmail:andPassword:withError:
Logs a user into the registered application. Email and password fields of user is used for this operation.
+ (NetmeraUser *)loginWithEmail:(NSString *)email andPassword:(NSString *)password withError:(NSError **)errorParameters
of the user
- password
of the user
- error
if it cannot access server
Return Value
the logged User
Discussion
Logs a user into the registered application. Email and password fields of user is used for this operation.
Declared In
Netmera.hInstance Methods
activateUserWithEmail:andError:
Activates the registered User.
- (BOOL)activateUserWithEmail:(NSString *)email andError:(NSError **)errorParameters
of the user
- error
if it cannot access server
Discussion
Activates the registered User.
Declared In
Netmera.hdeactivateUserWithEmail:andError:
Deactivates the registered User
- (BOOL)deactivateUserWithEmail:(NSString *)email andError:(NSError **)errorParameters
of the user
- error
if it cannot access server
Discussion
Deactivates the registered User
Declared In
Netmera.hregisterInBackgroundWithBlock:
Registers new user in the background thread and executes the given callback block. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields. There are also optional name and surname fields.
- (void)registerInBackgroundWithBlock:(void ( ^ ) ( NSError *error ))blockParameters
- block
The block to execute. The block should have the following argument signature: (NSError *error)
Discussion
Registers new user in the background thread and executes the given callback block. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields. There are also optional name and surname fields.
Declared In
Netmera.hregisterInBackgroundWithTarget:selector:
Registers new user. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields. There are also optional name and surname fields.
- (void)registerInBackgroundWithTarget:(id)target selector:(SEL)selectorParameters
- target
The object to call selector on.
- selector
The selector to call. It should have the following signature: (void) callBackRegisterWithError:(NSError *)error. error will be nil on success and set if there was an error.
Discussion
Registers new user. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields. There are also optional name and surname fields.
Declared In
Netmera.hregisterWithError:
Registers new user. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields. There are also optional name and surname fields.
- (BOOL)registerWithError:(NSError **)errorParameters
- error
if it cannot access server
Discussion
Registers new user. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields. There are also optional name and surname fields.
NetmeraUser user = [[NetmeraUser alloc] init];
user.email = @“test@test.com”;
user.password = @“12345”;
user.nickname = @“test”;
NSError err = nil;
BOOL isregistered = [user registerWithError:&err];
Declared In
Netmera.hupdate:
Updates user info. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields.
- (BOOL)update:(NSError **)errorParameters
- error
if it cannot access server
Discussion
Updates user info. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields.
Declared In
Netmera.hupdateInBackgroundWithBlock:
Updates user info. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields.
- (void)updateInBackgroundWithBlock:(void ( ^ ) ( NSError *error ))blockParameters
- block
The block to execute. The block should have the following argument signature: (NSError *error)
Discussion
Updates user info. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields.
Declared In
Netmera.hupdateInBackgroundWithTarget:selector:
Updates user info. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields.
- (void)updateInBackgroundWithTarget:(id)target selector:(SEL)selectorParameters
- target
The object to call selector on.
- selector
The selector to call. It should have the following signature: (void) callBackUpdateWithError:(NSError *)error. error will be nil on success and set if there was an error.
Discussion
Updates user info. Before calling this method email,password and nickname fields of the NetmeraUser should be setted. Those are the compulsory fields.
Declared In
Netmera.h