Skip to content

Respecting a Member's 'Does Not Display on Web' setting

When determining whether or not member content should be displayed from 3rd party location, you can use the 'DisplayFlags' value when determining if the member is set to 'do not display'.

You can reach this value by hitting the following member endpoint:{associationId})/members({memberId})/details

The response would include a key value pair of 'DisplayFlags' like so:

"DisplayFlags": 64,

That value is actually what is called a bitwise value. It is a way to store multiple values, as one value. Here is one article that  describes it:

So these multiple values, as CM saves them, each have a binary representation. Here it is:

CM Value NameNumerical Value

So in the case of the member with '64' for their DisplayFlags value, what that means based on the above is that the ONLY option they have checked is the 'SEARCH_RESULT_ICON' (which is has a value of 64).

If we were to say, check, 'DO_NOT_DISPLAY' for the member, their DisplayFlags value would then equal '65' (64 + 1) - DO_NOT_DISPLAY has a value of 1.
If we were to say, check, 'DO_NOT_DISPLAY' and 'DISABLE_LOGIN', their DisplayFlags value would then equal '73' (64 + 1 + 8). And so on.

So a quick way for the developer here to tell if DO_NOT_DISPLAY is turned on, is to use the bitwise operator on the value and compare it to 1 (which is the value of DO_NOT_DISPLAY), like so:

(displayFlags value from API) & (CM display value in chart above)

So in this case, it would look like this:

64 & 1

If you get a value of 0 back, then DO_NOT_DISPLAY is NOT checked (which is what you get in this case). Let's take another DisplayFlags value:

2891 & 1

If you get a 1 back (which you will here), then that means DO_NOT_DISPLAY IS checked.

Scroll To Top