Support » Plugin: RSVP ME » Display User avatar (take it from logged in user that submits)

  • Resolved Maartje_1992

    (@maartje_1992)


    Hi,

    Your plugin is really great 🙂
    I use it on a website to let users with a diffrent role subscribe to events.
    I do this by hiding the form from normal visitors and show it to users with an ‘alumnus’ role.

    When subscribed the users will already be displayed in at the backend in the metabox.
    What I want is to display them on the front end.

    When A user RSVP’d, some info like fname and lname will be saved in the table wp_rsvp_me_respondents.

    I queried this and it returns the names.
    But I would like to have a picture to, the avatar from the user.

    So if a user is logged in and RSVP’s to an event, is it possible to add all that persons data into the rsvp_me_respondents table?
    So it will also have the avatar.

    My code for looping on the front end is this btw (for users that search how to do that)

    <?php
    			global $wpdb;
    			$result = $wpdb->get_results( "SELECT * FROM wp_rsvp_me_respondents ");
    			//echo "<pre>"; print_r($result); echo "</pre>";
    
    			foreach($result as $row)
    			 {
    			echo '<div class="lid">';
    
    			$user_meta_picture = get_user_meta ($user->id, 'oa_social_login_user_picture', true);
    			echo '<img src='.$user_meta_picture.' />';
    
    			echo '<span>' . $row->fname . ' ' . $row->lname . '</span>';
    			echo '</p>';
    			echo '</div>';
    			}
    		?>

    Greets

    http://wordpress.org/plugins/rsvp-me/

Viewing 3 replies - 1 through 3 (of 3 total)
  • BTW, the code I used displays all submitters, not only from the particular event

    Plugin Author MicahBlu

    (@micahblu)

    Hi again, that is great feature idea…

    1. (Optionally) Show respondents on Front-End Event Pages
    2. Show their Avatars if they have them or Gravatar default

    I’m working on building add ons for RSVP Me.. These will most definitely be available and hopefully very soon.. I’ll keep you posted!

    p.s the query returned all respondents because its missing a WHERE event_id=$event_id

    🙂

    Oke, great.
    The query is working now.
    Thank you
    🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display User avatar (take it from logged in user that submits)’ is closed to new replies.