check user if exist or not

i have table 'profiles' i added by function every user signup
i want to check if the user name is exist in this table before signup ..
is the a way rather than select profiles table and check if column user name is match input or not ?
Was this page helpful?