Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MLIBZ-2859: Client.getActiveUser() returns only userId #240

Merged

Conversation

@b-stolyarov
Copy link
Collaborator

commented Jul 12, 2019

Description

If login to an app, then to close the app and open it again client.getActiveUser() returns only user id, even if user contained some additional filled fields (userName etc).

Changes

Added saving user info to realm table, except auth_token.

Tests

Instrumented

@b-stolyarov b-stolyarov requested a review from vinaygahlawat Jul 12, 2019

@vinaygahlawat vinaygahlawat requested a review from heyzooi Jul 15, 2019

/**
* Created by Prots on 2/12/16.
*/
public class UserStoreRequestManager<T extends BaseUser> {


public static final String USER_COLLECTION_NAME = "user";
public static final String USER_COLLECTION_NAME = "active_user_info";

This comment has been minimized.

Copy link
@heyzooi

heyzooi Jul 15, 2019

Contributor

any special reason why you need to change the collection name for the local cache?

This comment has been minimized.

Copy link
@heyzooi

heyzooi Jul 15, 2019

Contributor

I'm wondering if it would cause a breaking change

This comment has been minimized.

Copy link
@b-stolyarov

b-stolyarov Jul 16, 2019

Author Collaborator

USER_COLLECTION_NAME wasn't used in the SDK, but I agree that it's public constant, I'll create ACTIVE_USER_COLLECTION_NAME for active_user_info and return back user.

This comment has been minimized.

Copy link
@b-stolyarov

b-stolyarov Jul 16, 2019

Author Collaborator

I wouldn't like to use user for keeping user info, because this table name potentially can be busy.

This comment has been minimized.

Copy link
@b-stolyarov

b-stolyarov Jul 16, 2019

Author Collaborator

Updated.

@heyzooi
Copy link
Contributor

left a comment

I'm afraid changing the user table name would cause a breaking change

@b-stolyarov b-stolyarov merged commit 4634029 into master Jul 16, 2019

1 check failed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details

@b-stolyarov b-stolyarov deleted the feature/MLIBZ-2859_Client.getActiveUser_returns_only_id branch Jul 16, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.