• 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

    (@barbarojo)

    I forgot to say that I’m using the latest version of WordPlace at this time… 1.5.2

    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.