action user_new_form param is a string

use like this: $id = $user->ID; And if user is new set $id = 9999 function my_show_extra_profile_fields( $user ) { if(is_string($user) === true){ $user = new stdClass();//create a new $id = -9999; } $newsletter = esc_attr( get_the_author_meta( ‘_newsletter’, $id ) ); unset($user); }

Let Users Choose Post Categories

First, you will have to add the categories to user profiles. This question has been addressed before. That will give you the possibility to retrieve an array $data with the category ID’ a user is interested in. Now, you will need to turn that array into a list of posts. Depending on where you want … Read more

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

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