title: WP update_user_meta() is not working
body: <p>My goal is to create a plugin for counting the number of times a user logs in. But for now, it seems the update_user_meta() is not working or I'm not using it properly. I'm just trying to update a custom variable with the user_id value, so that I can know that I am storing a value in the user_meta.</p>
  
  <pre><code>&lt;?php
  function user_login_count2($redirect_to, $request, $user) {
      global $user;
      global $current_user;
      get_currentuserinfo();
      $user_id = $current_user-&gt;ID;
  
      if (isset($user_id)) {
        if ( get_user_meta($user_id, 'login_count2', true) ){
          //$login_count2 = get_user_meta($user_id, 'login_count2', true);
          //$login_count2++;
          //update_user_meta($user_id, 'login_count2', $login_count2); 
          $user_id_test = get_user_meta($user_id, 'user_id_test', true);
          update_user_meta($user_id, 'user_id_test', $user_id);
  
        }else{
            add_user_meta($user_id, 'login_count2', '1');
        }                  
      }else{
          return $redirect_to;
      }
  }
  add_filter('login_redirect', 'user_login_count2', 10, 3);
  
  function show_login_counts() {
      global $current_user;
      get_currentuserinfo();
      $user_id = $current_user-&gt;ID;
  
      $user_id_test = get_user_meta($user_id, 'user_id_test', true);
      if(isset($_GET['ict']) &amp;&amp; $_GET['ict'] == 1){
          echo $user_id;
          echo $user_id_test;
      }
  }
  add_action('wp_footer', 'show_login_counts');
  ?&gt;
  </code></pre>