Title: Bug: disabling moderations
Last modified: August 18, 2016

---

# Bug: disabling moderations

 *  [barbarojo](https://wordpress.org/support/users/barbarojo/)
 * (@barbarojo)
 * [20 years, 8 months ago](https://wordpress.org/support/topic/bug-disabling-moderations/)
 * I tried to turn off moderation of comments with no luck. I had to go see the 
   code and found out this:
 * FILE: wp-includes/function-post.php
    ln 500: if ( $userdata && ( $user_id == 
   $post_author || $userdata->user_level >= 9 ) ) { $approved = 1; …. ….
 * and then it inserts $approved in the field ‘comment_approved’ of the table wp_comments(
   ln 513)
 * $userdata is retrieve this way:
    ln 479: $userdata = get_userdata($user_id);
 * where get_userdata() retrieved the data of the user storaged in the table wp_users…
   which means that only users that have the field user_level >= 9 can publish comments
   without moderation but if you look at the file FILE wp_admin/users.php you’ll
   see that the user_level field will be 2 if the option ‘new_users_can_blog’ is
   selected.
    Shouldn’t it this way?: if ( $userdata && ( $user_id == $post_author
   || $userdata->user_level >= 2 ) ) { $approved = 1; …. ….

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [barbarojo](https://wordpress.org/support/users/barbarojo/)
 * (@barbarojo)
 * [20 years, 8 months ago](https://wordpress.org/support/topic/bug-disabling-moderations/#post-265489)
 * I forgot to say that I’m using the latest version of WordPlace at this time… 
   1.5.2
 *  [Esra](https://wordpress.org/support/users/esra/)
 * (@esra)
 * [20 years, 8 months ago](https://wordpress.org/support/topic/bug-disabling-moderations/#post-265499)
 * I’d like to know how to do this successfully as well. I tried and it messed up
   the entire comment feature, then I had to mess about for an hour in order to 
   find the mistake.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Bug: disabling moderations’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Esra](https://wordpress.org/support/users/esra/)
 * Last activity: [20 years, 8 months ago](https://wordpress.org/support/topic/bug-disabling-moderations/#post-265499)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
