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 … Read more

Add extra field to users

your function never defines a value for that field so when you check if its equal to 1 you never get true. try this: add_action( ‘show_user_profile’, ‘module_user_profile_fields’ ); add_action( ‘edit_user_profile’, ‘module_user_profile_fields’ ); function module_user_profile_fields( $user ) { ?> <h3>Module Options</h3> <table class=”form-table”> <tr> <th><label for=”module_activation”>Module Activation</label></th> <td> <input id=”module_activation” name=”module_activation” type=”checkbox” value=”1″ <?php if ( … Read more

wp_insert_post add meta_input

meta_input is just a single-dimension array as key => value: ‘meta_input’ => array( ‘name’ => $post[‘name’], ‘city’ => $post[‘city’] ) tax_input is slightly different, with tax as key and an array of values: ‘tax_input’ => array( ‘taxonomy_name’ => array( ‘term’, ‘term2’, ‘term3’ ) ) Note that for tax_input to work, the user currently logged in … Read more