get_user_meta returning empty when it’s NOT empty

I can confidently say that it is empty at the point at which your code checks the variable. The three possibilities are: $user_id is not set or is set to an incorrect value. As you don’t show the code that sets this value, I can’t tell. You are using the wrong key. Something is hooked … Read more

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); }

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

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