Skip to content

FBUser #407

Answered by deleteLater
thanh81 asked this question in Q&A
Jun 21, 2023 · 1 comments · 4 replies
Discussion options

You must be logged in to vote

Hi @thanh81,

Thank you for your question. The FbUser parameter is required and cannot be null when we do Variation calls. This is because we rely on the user context to evaluate the flag value and record insights related to the flag.

In your case, I would suggest you define a default user within your application and use that user in your codebase, maybe something like this:

public static readonly FbUser FbDefaultUser = FbUser.Builder("default-user-id").Name("default").Build();

Or we define a built-in default user in FbUser.cs, so we can use FbUser.Default.

public static readonly FbUser Default = Builder("default-user-id").Name("default").Build();

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@thanh81
Comment options

@cosmos-explorer
Comment options

@thanh81
Comment options

@cosmos-explorer
Comment options

Answer selected by thanh81
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants