Get user id from email?

You are probably looking for the user_exists function. http://codex.wordpress.org/Function_Reference/email_exists

This function will check whether or not a given email address ($email) has already been registered to a username, and returns that users ID (or false if none exists).

If the email address does not exist (user_exists returns false), you may want to use the wp_create_user function. http://codex.wordpress.org/Function_Reference/wp_create_user

The wp_create_user function allows you to insert a new user into the WordPress database

Only do that if you want to create a WordPress user though, which you may or may not. I’m a bit confused by this part of the question.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)