• Hello ,
    I need help in a small issue ,
    How do i get the Commenter ID in the comment loop? Ofcourse if the user is registered .

    user_id or author doesnt work .

Viewing 3 replies - 1 through 3 (of 3 total)
  • $comment->user_id should give you the user id for registered users or 0 for unregistered users with the comment loop in comments.php

    Thread Starter aloncarmel

    (@aloncarmel)

    works thanks !

    José Luís

    (@jlcarneiro)

    Hello, I tried this solution comparing it to zero (0) to test if the author is a registered user:

    global $comment;
    if($comment->user_id == 0)
    {here goes the rest of the code}

    I also tried comparing it to ‘0’:

    global $comment;
    if($comment->user_id == '0')
    {here goes the rest of the code}

    But both tests always result false. Can you help me?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Commenter ID’ is closed to new replies.