How to Access wp_usermeta Data Immediately After a New User is Created

The edit_user_created_user will work for when adding users via user-new.php: add_action( ‘edit_user_created_user’, ‘wpse_edit_user_created_user’, 10, 2 ); //for user-new.php page new user addition function wpse_edit_user_created_user( $user_id, $notify ) { $meta = get_user_meta( $user_id, ‘my_field’, true ); } For the sake of completeness, I used the following code for testing the user meta data, which I grabbed … Read more

trying to determine if meta value exists for user and if not auto submit gravity form to redirect

Your <?php/?> tags are aligned such that none of your actual PHP code is being interpreted as PHP code (except the is_page (‘1150′) conditional) – it’s actually just printing it all into your markup, including the <script> element. So since it’s not running the logic to check the user or the user meta-data, the script … Read more

I want to update my user meta table

changing the code as below gave me my answer : $userdata = array( ‘user_login’ => $_POST[‘usname’], ‘user_pass’ => $_POST[‘passw’] // When creating an user, `user_pass` is expected. ); $user_id = wp_insert_user( $userdata ) ; update_user_meta( $user_id, ‘address’, $_REQUEST[‘address’] ); update_user_meta( $user_id, ‘age’, $_REQUEST[‘age’]); update_user_meta( $user_id, ‘class’, $_REQUEST[‘class’]); //On success if ( ! is_wp_error( $user_id ) … Read more