Inherits from EVObject : NSObject
Conforms to NSCoding
Declared in EVUser.h

Overview

An Everlive user object that is the local representation of the user persisted to the Everlive cloud.

Tasks

Class Methods

allUsers:

Returns all users from everlive.

+ (void)allUsers:(EVObjectFetchResultBlock)block

Parameters

block

The block to execute. The block should have the following argument signature: (BOOL success, NSError *error)

Declared In

EVUser.h

changePassword:oldPassword:newPassword:block:

Changes the password of the specified user.

+ (void)changePassword:(NSString *)username oldPassword:(NSString *)oldPassword newPassword:(NSString *)newPassword block:(EVObjectResultBlock)block

Parameters

username

The username of the user.

oldPassword

The old password of the user.

newPassword

The new password of the user.

block

The block to execute. The block should have the following argument signature: (BOOL success, NSError *error)

Declared In

EVUser.h

currentUser

Return the current logged in user from disk.

+ (EVUser *)currentUser

Declared In

EVUser.h

fetchUser:block:

Returns the specific user.

+ (void)fetchUser:(id)userId block:(EVUserResultBlock)block

Parameters

userId

The id against which the user will be retrieved.

block

The block to execute. The block should have the following argument signature: (EVUser user, NSError error)

Declared In

EVUser.h

fetchUserWithEmail:block:

Returns the user for email.

+ (void)fetchUserWithEmail:(NSString *)email block:(EVUserResultBlock)block

Parameters

email

The email to get the user for.

block

The block to execute. The block should have the following argument signature: (EVUser user, NSError error)

Declared In

EVUser.h

fetchWithAccessToken:block:

Returns information about the currently logged in user

+ (void)fetchWithAccessToken:(NSString *)accessToken block:(EVUserResultBlock)block

Parameters

accessToken

The access token that should be passed for authentication of the request.

block

The block to execute. The block should have the following argument signature: (EVUser user, NSError error)

Declared In

EVUser.h

linkFacebookAccount:accessToken:block:

Links the everlive account with a Facebook account

+ (void)linkFacebookAccount:(NSString *)userId accessToken:(NSString *)accessToken block:(EVObjectResultBlock)block

Parameters

userId

The Id of the user

accessToken

The access token from the external provider

block

The block to execute

Declared In

EVUser.h

linkGoogleAccount:accessToken:block:

Links the everlive account with a Google account

+ (void)linkGoogleAccount:(NSString *)userId accessToken:(NSString *)accessToken block:(EVObjectResultBlock)block

Parameters

userId

The Id of the user

accessToken

The access token from the external provider

block

The block to execute

Declared In

EVUser.h

linkLiveIdAccount:accessToken:block:

Links the everlive account with a LiveID account

+ (void)linkLiveIdAccount:(NSString *)userId accessToken:(NSString *)accessToken block:(EVObjectResultBlock)block

Parameters

userId

The Id of the user

accessToken

The access token from the external provider

block

The block to execute

Declared In

EVUser.h

logOut

Logs out the currenlty logged in user on disk.

+ (void)logOut

Declared In

EVUser.h

loginInWithUsername:password:block:

Makes an asynchronous request to log in a user with specified credentials.

+ (void)loginInWithUsername:(NSString *)username password:(NSString *)password block:(EVUserResultBlock)block

Parameters

username

The username of the user.

password

The password of the user.

block

The block to execute. The block should have the following argument signature: (EVUser user, NSError error)

Declared In

EVUser.h

loginWithFacebook:block:

Makes an asynchronous request to log in a user with facebook access token.

+ (void)loginWithFacebook:(NSString *)accessToken block:(EVUserResultBlock)block

Parameters

accessToken

The access token obtained from Facebook.

block

The block to execute. The block should have the following argument signature: (EVUser user, NSError error)

Declared In

EVUser.h

loginWithGoogle:block:

Makes an asynchrounous request to log in a user with google access token

+ (void)loginWithGoogle:(NSString *)accessToken block:(EVUserResultBlock)block

Parameters

accessToken

The access token obtained from LiveId

block

The block to execute. The block should have the following argument signature: (EVUser user, NSError error)

Declared In

EVUser.h

loginWithLiveId:block:

Makes an asynchrounous request to log in a user with live id access token

+ (void)loginWithLiveId:(NSString *)accessToken block:(EVUserResultBlock)block

Parameters

accessToken

The access token obtained from LiveId

block

The block to execute. The block should have the following argument signature: (EVUser user, NSError error)

Declared In

EVUser.h

resendVerificationEmailWithUserId:block:

Resends the verification email for the user with the specified ID

+ (void)resendVerificationEmailWithUserId:(id)userId block:(EVObjectResultBlock)block

Parameters

userId

The id of the user

block

The block to execute. The block should have the following argument signature: (BOOL success, NSError *error)

Declared In

EVUser.h

resendVerificationEmailWithUsername:block:

Resends the verification email for the user with the specified username

+ (void)resendVerificationEmailWithUsername:(NSString *)username block:(EVObjectResultBlock)block

Parameters

username

The username for which to send verification email

block

The block to execute. The block should have the following argument signature: (BOOL success, NSError *error)

Declared In

EVUser.h

setNewPassword:withSecretQuestionId:andSecretAnswer:newPassword:block:

Sets a new password for the user with the specified username by using the secret question and secret answer

+ (void)setNewPassword:(NSString *)username withSecretQuestionId:(NSString *)secretQuestionId andSecretAnswer:(NSString *)secretAnswer newPassword:(NSString *)newPassword block:(EVObjectResultBlock)block

Parameters

username

The username identifying the user

secretQuestionId

The secret question ID of the user

secretAnswer

The answer to the secret question

newPassword

The new password to set

block

The block to execute. The block should have the following argument signature: (BOOL success, NSError *error)

Declared In

EVUser.h

setNewPasswordWithResetCode:newPassword:block:

Sets a new password for the user with the specified reset code

+ (void)setNewPasswordWithResetCode:(NSString *)resetCode newPassword:(NSString *)newPassword block:(EVObjectResultBlock)block

Parameters

resetCode

The reset code

newPassword

The new password to set

block

The block to execute. The block should have the following argument signature: (BOOL success, NSError *error)

Declared In

EVUser.h

unlinkFacebookAccount:block:

Unlinks the everlive user account and the Facebook account

+ (void)unlinkFacebookAccount:(NSString *)userId block:(EVObjectResultBlock)block

Parameters

userId

The user id

block

The block to execute

Declared In

EVUser.h

unlinkGoogleAccount:block:

Unlinks the everlive user account and the Google account

+ (void)unlinkGoogleAccount:(NSString *)userId block:(EVObjectResultBlock)block

Parameters

userId

The user id

block

The block to execute

Declared In

EVUser.h

unlinkLiveIdAccount:block:

Unlinks the everlive user account and the LiveID account

+ (void)unlinkLiveIdAccount:(NSString *)userId block:(EVObjectResultBlock)block

Parameters

userId

The user id

block

The block to execute

Declared In

EVUser.h

Instance Methods

isAuthenticated

Checks if the current user is logged in.

- (BOOL)isAuthenticated

Declared In

EVUser.h

remove:

Removes the user from everlive. Must be authenticated to remove a user.

- (void)remove:(EVObjectResultBlock)block

Parameters

block

The block to execute. The block should have the following argument signature: (EVUser user, NSError error)

Declared In

EVUser.h

signUp:

Signs up the user. Make sure that username and password are set. This will also enforce that the username isn’t already taken.

- (void)signUp:(EVUserResultBlock)block

Parameters

block

The block to execute. The block should have the following argument signature: (EVUser user, NSError error)

Declared In

EVUser.h