title: How to display status of commentator in wordpress
body: <p>everybody</p>
  
  <p>i have my site in WordPress, in my site i have created one forum page for user discussion using WordPress default comment form. </p>
  
  <p>in my comment form i also want to show status of commentator in order to check that whether it is online or offline by using simple text <strong>[Online/Offline]</strong></p>
  
  <p>right now i am using code given below</p>
  
  <pre><code>    &lt;div class=skyblue&gt;&lt;/br&gt;
      &lt;?php if ( 0 != $args['avatar_size'] ) echo get_avatar( $comment, $args['avatar_size'] ); ?&gt;
                  &lt;font color=red size=5&gt;&lt;?php printf( __( '&lt;cite &gt;%s&lt;/cite&gt; ' ), get_comment_author_link() ); ?&gt;&lt;/font&gt;
  
  &lt;div align=right&gt;&lt;?php 
  $user_id   = get_comment(get_comment_ID())-&gt;user_id;
  
  if ($user_id)
  {
      $user_info = get_userdata($user_id );
      {
   echo 'Online';
        } else {
        echo 'Offline';
       }
  } ?&gt;&lt;/div&gt;
  
      &lt;div  align="left"&gt;&lt;a href="&lt;?php echo esc_url( get_comment_link( $comment-&gt;comment_ID, $args ) ); ?&gt;"&gt;
                  &lt;?php
                      /* translators: 1: date, 2: time */
                      printf( __( '%1$s at %2$s' ), get_comment_date(),  get_comment_time() ); ?&gt;&lt;/a&gt;&lt;?php edit_comment_link( __( '(Edit)' ), '&amp;nbsp;&amp;nbsp;', '' );
                  ?&gt;&lt;br&gt;
              &lt;/br&gt;&lt;/div&gt;&lt;/div&gt;
  </code></pre>
  
  <p><a href="http://i.stack.imgur.com/LIJ5l.png" rel="nofollow">above image show how commentator status looks like</a></p>
  
  <p>can anybody help me in order to show status of commentator in wordpress</p>