MMLoginManager Class Reference
| Inherits from | NSObject |
| Conforms to | MMDBFetcherDelegate |
| Declared in | MMLoginManager.h MMLoginManager.m |
Overview
A singleton class that is used to manage the user’s login state. This class provides methods to log a user in, log a user out, login as guest, and retrieve the current logged in user.
Instance Methods
beginLoginWithUserName:withPassword:
Begin an asynchronous call to log a user in. First, it checks to see if the user name exists on the server, then it verifies the user’s password.
- (void)beginLoginWithUserName:(NSString *)userName withPassword:(NSString *)passwordParameters
- userName
The user name to login.
- password
The user’s password.
Declared In
MMLoginManager.hbeginUpdateUser:
Starts an asynchronous to update a user’s profile.
- (void)beginUpdateUser:(MMUser *)userToUpdateParameters
- userToUpdate
The user profile to update.
Declared In
MMLoginManager.hchangePasswordForUser:
Change password for user.
- (RACSignal *)changePasswordForUser:(MMUser *)userDeclared In
MMLoginManager.hgetLoggedInUser
Returns the user profile of the user that is currently logged in.
- (MMUser *)getLoggedInUserReturn Value
An MMUser object that represents
the user that is currently logged
in.
Declared In
MMLoginManager.hisUserLoggedIn
Checks to see if the user is logged in.
- (BOOL)isUserLoggedInReturn Value
Returns whether or not a user is logged in.
Declared In
MMLoginManager.hisUserLoggedInAsGuest
Checks to see if a user is logged in as guest.
- (BOOL)isUserLoggedInAsGuestReturn Value
Returns whether or not a user is logged in as a guest.
Declared In
MMLoginManager.hloginAsGuest
Logs a user in as a guest. All this does is
create a MMUser object with it’s email property
set to “kGuest”.
- (void)loginAsGuestDeclared In
MMLoginManager.hlogoutUser
Removes the current user profile from the device, which has the effect of logging the user out.
- (void)logoutUserDeclared In
MMLoginManager.hsaveUserProfileToDevice:
Serializes the specifid user’s profile to the device.
- (void)saveUserProfileToDevice:(MMUser *)userParameters
- user
The
MMUserprofile to save to the device.
Declared In
MMLoginManager.h