title: WordPress insert new user in wp_users
body: <p>I need to create a new user in wp_users table but neither wp_create_user nor wp_insert_user worked.
  I'm trying in this way but no user is inserted.</p>
  
  <pre><code>$newUser = $wpdb-&gt;insert(
          'wp_users',
          array(
              'user_login' =&gt; $userRow-&gt;email,
              'user_pass' =&gt; $userRow-&gt;password,
              'user_nicename' =&gt; $userRow-&gt;firstname,
              'user_email' =&gt; $userRow-&gt;email,
              'user_url' =&gt; '',
              'user_registered' =&gt; $userRow-&gt;registration,
              'user_status' =&gt; 0,
              'display_name' =&gt; $userRow-&gt;firstname
          )
      );
      if(!$newUser) {
          echo '&lt;script&gt;alert("User has not been created.")&lt;/script&gt;'; 
          return;
      }
  </code></pre>