FBUser #407
FBUser
#407
|
When trying to use client.BoolVariationDetail, why can't I pass in a null for the user? I don't have any user filters in the featureflag. Perhaps just have the various functions overridden on the user too so we don't have to pass it in, the same as the defaultValue. |
Answered by
deleteLater
Jun 22, 2023
Replies: 1 comment 4 replies
|
Hi @thanh81, Thank you for your question. The 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 public static readonly FbUser Default = Builder("default-user-id").Name("default").Build(); |
4 replies
Answer selected by
thanh81
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @thanh81,
Thank you for your question. The
FbUserparameter is required and cannot be null when we doVariationcalls. 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:
Or we define a built-in default user in FbUser.cs, so we can use
FbUser.Default.