Log in with username/password: lyceum/lyceum

Changeset 1060

Show
Ignore:
Timestamp:
08/16/07 01:53:46 (1 year ago)
Author:
jjb
Message:

Proper detection of user permissions for commenting.

May fix the spam problem discussed in #738, although the comment_registration flag should have been set and getting in the way.

Vaguely related to #751.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/lyceum/wp-comments-post.php

    r1034 r1060  
    4040      } 
    4141   } 
    42    if ( get_option('comment_priviliges') && !is_array($userdata->capabilities) ) 
     42   if ( get_option('comment_priviliges') && !current_user_can('read') ) 
    4343      die( __('Sorry, you must have permissions on this blog to post a comment.') ); 
    4444} else { 
  • trunk/src/lyceum/wp-content/themes/default/comments.php

    r1004 r1060  
    6868<?php if ( get_option('comment_registration') && !$user_ID ) : ?> 
    6969<p>You must be <a href="<?php echo get_option('siteurl'); ?>/wp-login.php?redirect_to=<?php the_permalink(); ?>">logged in</a> to post a comment.</p> 
    70 <?php elseif ( get_option('comment_priviliges') && !is_array($userdata->capabilities)) : ?> 
     70<?php elseif ( get_option('comment_priviliges') && !current_user_can('read')) : ?> 
    7171<p>You must have permissions on this blog to post a comment.</p> 
    7272 
Log in with username/password: lyceum/lyceum