Title: Conditional Gravatar display
Last modified: August 20, 2016

---

# Conditional Gravatar display

 *  Resolved [salatfresser](https://wordpress.org/support/users/salatfresser/)
 * (@salatfresser)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/conditional-gravatar-display/)
 * Hi, i don’t know what to do to accomplish the following:
 * At my Club website, signed up members can choose on their profiles whether they
   want to show specific information or not (like avatar, email address, phones).
   I have done this with the Cimy User Extra Fields plugin. In the author template,
   to show or hide these fields i do it with this:
 *     ```
       $privacy = get_cimyFieldValue($curauth->ID, 'PRIVACY_PHOTO');
   
       ...
   
       <?php  if((get_cimyFieldValue($curauth->ID, 'PRIVACY_PHOTO', yes))) { ?>
       <div id="author_avatar">
       <img src="TEMPLATE-URL/images/gravatar.png" />
       </div>
       <?php } ?>
   
       <?php  if((get_cimyFieldValue($curauth->ID, 'PRIVACY_PHOTO', no))) { ?>
       <div id="author_avatar">
       <?php echo get_avatar( $curauth->ID, 140 ); ?>
       </div>
       <?php } ?>
       ```
   
 * Now, with the Members List i want to do the same, hide the information if the
   user has selected NO in that element, so that it also doesn’t show in the members
   list. I tried to add this condition on the members.php but it doesn’t work. I’m
   thinking it’s the curauth->ID that is wrong here. I’m not an expert in PHP. I
   really hope this can work out… can anyone help me pleeeaseee? Any ideas?
 * cheers,
    M.
 * [http://wordpress.org/extend/plugins/members-list/](http://wordpress.org/extend/plugins/members-list/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [ternstyle](https://wordpress.org/support/users/mpraetzel/)
 * (@mpraetzel)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/conditional-gravatar-display/#post-3238650)
 * [http://forum.ternstyle.us/topic2-members-list-plugin-and-cimy-user-extra-fields.html](http://forum.ternstyle.us/topic2-members-list-plugin-and-cimy-user-extra-fields.html)

Viewing 1 replies (of 1 total)

The topic ‘Conditional Gravatar display’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/members-list_a1a1a1.svg)
 * [Members List Plugin](https://wordpress.org/plugins/members-list/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/members-list/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/members-list/)
 * [Active Topics](https://wordpress.org/support/plugin/members-list/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/members-list/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/members-list/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [ternstyle](https://wordpress.org/support/users/mpraetzel/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/conditional-gravatar-display/#post-3238650)
 * Status: resolved