Different user can see different label

image

So I have two users. First is user C and second is user S (customer,seller). Anyone know how can I display, if user is category C than the label "YOU ARE CATEGORY C" will appear and if the user is user S the label "YOU ARE CATEGORY S" will appear. I use firebase in storing the user category

What if a user is both a customer and a seller?

Nope it can only be either Customer or seller because I set it that way.
Its just a simple school project :sweat_smile:

You should use If..then statements. A nice tutorial is in Programming Your App to Make Decisions that explains the concept.

Something like:

If CATAGORY C then display Label.Text = You are category c else Label.Text = You are category S .

Create some Blocks. If you run into trouble, post them here and someone will provide specific advice. Exactly what you need to do depends on your log in code so far.

1 Like

Thank you so much

how do you set someone as category c or category s?

What you do depends on the information you collect when someone registers to use your app. Your registration process probably collects name, address etc. Add a category perhaps called status where a user enters c or s. The category will be associated with the USER.. When the USER logs in, read the data associated with the USER for status

How to do that depends on the code you already wrote to identify the USER.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.