Run a workflow once to make sure that everyone has a username!

Hello.
I have multiplie ways of signing in (email, fb, google) and when you create an account, you have to create a username. But at that time, your account is already created so if the user decides to leave the page of username creation, he will not have any username which will cause a lot of problems in the future. (since when you open the app, you start on the home page, which is logic…)

My idea was that if the current’s user’s username is empty, then he should be redirected to the username creation page. But I can’t see how to do that with efficiency. Maybe the workflow “When user is loaged in and if username is empty, then navigate to …” but I am afraid it is too much (once you have a username, you are good so having this workflow run in the background would only occupy server capacity for nothing).

Thank you for your help!

It’s the best solution I think.

Else, you can also add a group in the “user profile” page or section, to collect the username. And this group will be displayed only of the user’s username is empty. And make it red or flashy so that your users will have to provide their username if they want to get rid of this flashy part of their screen :grinning_face_with_smiling_eyes:

Hello, @lucaspenanguer

Make it so once the signup with whatever source. A popup appears then from the editing menu for the pop up disable closing using esc and clicking. Then have an input and a button that could say “Submit”. Once its clicked make changes to current user. Current users Username= Input x’s Value. Then only when input x is valid. But to do that make sure that on input x’s editor you select must contain something. (It says something like that). I might not have explaned well so I made an example.

Preview Mode:https://forumexamples.bubbleapps.io/version-test/username_popup?debug_mode=true
Editor:Forumexamples | Bubble Editor

Sincerely,
Breeze

Also you just got to make it show a popup when signup is clicked. And if you have them getting redirected to another page. Delete that and make it when Submit for the username is clicked and only when the input is valid.

thank you for the answers, maybe I explained myself bad. I know how to create a username page but I am just afraid that if the user decides to close the app/the page after he signed up, when he was to enter the username, the “username” entry will remain empty. This is why I thought of a workflow that says if empty, then he is redirected to the username page but once again I am afraid it is unnecessary steps and maybe there is something more simple to make sure he has a username entered

Here ill make a basic plugin for you. So when they are about to leave the tab something will pop up and you can customize it to your liking one sec.