User Functions using ID instead of email

Hi!

Does anyone know if you can modify the User actions (ex: sign user in) so that it’s based on a user ID instead of their email. I was able to make it so that Users are created based on a randomly generated email… now I’m trying to let people log in using an ID but Bubble expects an email.

Thank you!!

You cannot change the “native” log in function. But you can, if you add the user email on signin use this:
User enter password and username in field
You log in using in email field: Do a search in “Users” where “username” = input field username 'email

This is vey important to check when user signup that the username is not already in use

@Jici Thank you!

Could you clarify the steps, because I am not able to make this work. I put in this first:

And then from there I can’t get it to work

Thank you for your help!

Just select 's value
And in the Log the user in, you need to add :first item after the Search for user

@Jici I understand, thank you!! It works.

Added question: do you think that this will affect the password field too? In the workflow, I’m, using “Log User In” with the email set up the way you just told me, and the password set up by putting in the password input’s value:

image

It is giving me an error and saying “sorry, that’s not the right password”. The debugger shows this, but I can’t see why the “input isn’t valid” (the password is for sure correct):

image

I think you should use Debug mode step by step to see which information is provided to the log theuser in action.

Thanks Jici! I’ve tried but all the info being sent seems fine.