Title: Coding HELP
Last modified: August 19, 2016

---

# Coding HELP

 *  [yarray](https://wordpress.org/support/users/yarray/)
 * (@yarray)
 * [16 years, 7 months ago](https://wordpress.org/support/topic/coding-help-4/)
 * Working with wordpress plugin
    -  Register Plus
 * My site is set up so a user who registers can be referred by another user. The
   referral code/invitation code is databased in
 * wp_users-> user_activation_key
 * When a user is on his or her status page i would like to display every person
   they have referred for them on the page.
 * Example:if userA referred userX and userV then on userA’s status page he would
   be able to see both of those users. I dont know the proper way to do this with
   wordpress sql.
 *     ```
       <ul class="sidebar" style="margin:0 0 10px 0;">
       <li class="referral">
       <h2 class="widgettitle"><?php _e('Recent Shows Updated'); ?></h2>
       <ul>
              <?php global $wpdb, $current_user;
            	get_currentuserinfo();
               $userref = get_userdata($userrefs=>user_activation_key);
               foreach($userref as $current_user->user_login)?>
       <li style="background:#ffffe5;"><?php echo $userref; ?></li>
       </ul>
              <?php endforeach; ?>
   
       </li></ul></div>
       ```
   

The topic ‘Coding HELP’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [yarray](https://wordpress.org/support/users/yarray/)
 * Last activity: [16 years, 7 months ago](https://wordpress.org/support/topic/coding-help-4/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
