Forum Academy Marketplace Showcase Pricing Features

[SOLVED] Do a search for & "where"

Hi there.

I have a question regarding the function Do A Search For.
I want a user to log in with his username instead of his email. The name is already in the database.
I thought about trying to catch the email address of the user whose name is used in the login form. Now I don’t see any “where” argument like in SQL. Do I have to nest searches?

What I want, short:
Button Login is pressed
Get nickname from input, make thing “nick”, get password from input
Do a search for User’s nickname=“nick”
Get that user’s email
Login with that email and password

Thank you very much.

Nevermind, it was really easy, I was thinking too complicated.

I am creating a thing “email” which searches for a user that has the field username = input nickname’s value. That user is returned and I can simply attach the “…User’s email”.