How to check whether a username is in use? I'm currently trying to implement a function to check if a user already exists. I've read that this could be done by Rules whit the condition "Entity exists by property" but I can't find it anywhere. I've tried it with Rules 7.x-2.2 &amp; Rules 7.x-2.3

Is this option still available or not? Or is it located in a other module?

it's related to this question: How can I check whether a username is in use?
Drupal 7 has a function to return a user object by username: 

$user = user_load_by_name($name);
if(!$user){
    // User doesn't exist
} 
else {
    // User exists
}


function user_load_by_name

And a function to return a user object by email:

function user_load_by_mail