• Resolved petekyle

    (@petekyle)


    Hi,

    This question has been asked before but does not seem to be answered. Hope someone can help…

    When a comment is left I need to display the comment author’s role after their name,
    i.e. Comment by <Comment Author’s name> <Comment Author’s Role> on <Comment Date>
    e.g. Comment by Pete (Admin) on 10/04/09

    I am struggling to identify the Comment Author’s role. Any suggestions?

    Pete

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter petekyle

    (@petekyle)

    I managed to work it out…

    <?php $user_info = get_userdata($comment->user_id);
    
    					if ( $user_info->user_level == 10 ) {
    							echo('User level: ' . $user_info->user_level . "\n");
    					} ?>

    nice work man.

    Been looking to do this for the user_name and your idea worked a treat

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Comment Author Level or Role’ is closed to new replies.