Registering a User in Bubble
How do you display a user's name in your Bubble app? Well, let me demonstrate that to you. We're going to start one step back which is registering a user. To show you the workflow, we've got a button for register and then sign user up and then I'm going to direct them to a page called profile.
Collecting User Information
Where the registration field has to have an email address and the password but then we can also collect additional details on our users such as first name which I'm going to add as a field type text and link that up to my input of name. So you can see my input names value, my password inputs value and my emails value and then they get taken to a new page.
Testing User Registration
So let's refresh this and so I put in my name, put in a email address and the password make sure you use secure passwords and I read I'm now registered as a user and I'm also logged in and let me prove that to you.
Verifying User Login
So if I go to the profile page I'm just going to add some text and I'm going to say current user is logged in and it's a very easy to make mistake when you are developing and testing your app to think oh this isn't working or I can't see the data that I should be able to see. First thing I always check is am I actually logged in as the user that I meant to be have I been logged out at some point.
Displaying User Information
So I can see that the user is logged in and then if I want to print the user's name into this page it's very easy I just go current user first name, refresh that and there we have it I have the current users first name and I can do that to display any field that I've added to current user.
Recap and Conclusion
So yeah really really easy that is one way of displaying a current users first name and a bit of a recap on registering and saving that first name when the user registers.