title: wordpress delete user by id
body: <p>i am currently trying to allow a wordpress uer to delete there own entry from the database.</p>
  
  <p>At the moment i have a form which when is submitted throws out a js alert confirming they wish to proceed. once they click ok, they are then directed to a page with the follwoing code:</p>
  
  <pre><code>&lt;?php $user_id = $current_user-&gt;ID ;  wp_delete_user($user_id) ; ?&gt;
  </code></pre>
  
  <p>You will now be redirected to the homepage.</p>
  
  <p>"></p>
  
  <p>For some reason this isnt working. any ideas what it could be? no errors are getting thrown out, and the meta refresh carries on as normal.</p>
  
  <p>Any help would be greatly appreciated,</p>
  
  <p>Cheers Danyo</p>
  
  <p>EDIT: Just noticed the meta refresh isnt showing, but should be located under the message "You will now be redirected to the homepage."</p>