(Full disclosure: this topic comes up so often for new users that I created this post primarily for the selfish purpose of being able to link to it when answering questions in the forum. Yeah, I’m lazy efficient like that.)
So, you’re trying to show user data in, say, a repeating group or a dropdown, and you are only seeing data associated with the current user, eh? Or maybe you are trying to do a count of things in the User
data type, and you can see with your own eyes that there are 10 things in the data type, but the count is showing a number other than 10. What the heck is going on, you ask? Well, read on.
First, you probably aren’t doing anything wrong, so you’ve got that going for you, which is nice. It’s just that you probably haven’t learned about privacy rules yet, and you don’t know that Bubble has the following default rule in place on the User
data type.
With that rule in place, users can only access/see their own data, and while that is great from a privacy perspective, it trips up a good number of new Bubblers who want to access/show user data across users in some way, shape, or form.
The way to address this matter is to either remove the default rule entirely or modify it to meet the needs of your app by allowing everyone else to, say, find other users in searches and/or view certain fields. If you choose to remove the rule, you will likely have addressed your short-term issue, but you should definitely circle back to privacy rules at some point because they are very important when it comes to securing your app’s data.
Hope this helps.
Best…
Mike