Events Manager
[resolved] BuddyPress Activity Stream showing Non-registered User is attending event (6 posts)

  1. ngkokkee
    Posted 3 years ago #


    I am using BuddyPress 1.5.5 with Events Manager 5.2.9.

    The events manager bookings management correctly shows the user who booked the event. However on the BuddyPress activity stream, it shows Non-registered User is attending event, even for my own bookings.

    The only customization I did for my site is to use wp_set_current_user to login the user instead of using the wordpress default login page because of single sign-on.

    This is the code section dealing with the login.

    wp_set_current_user($user_id, $user_login);
    do_action('wp_login', $user_login);
    //bp_core_redirect is required to fix the login problem where user name is not setup correctly in the first page.

    Kok Kee


  2. agelonwl
    Posted 3 years ago #

    I tried this one and seems to be working fine; Is it working without your customization?

  3. ngkokkee
    Posted 3 years ago #

    One line code change fixed the problem.

    In the file events-manager\buddypress\bp-em-activity.php

    function bp_em_record_activity_booking_save( $result, $EM_Booking )
    	$user = $EM_Booking->person;

    replace with

    $user = $EM_Booking->get_person();

    Not sure why $EM_Booking->person is not initialized but the class itself seems to be using $EM_Booking->person_id which is valid. The $EM_Booking->get_person() checks whether $EM_Booking->person is initialized and initialize it with $EM_Booking->person_id if not.

  4. ngkokkee
    Posted 3 years ago #

    Any developer prowling around can confirm whether this can be patched in the next release?

    I didn't test much of the buddypress features but you might need to take a look at other code access object members directly whether they should also be using the get_ functions instead.

  5. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 3 years ago #

    yup, confirmed will be added. well spotted.

  6. ngkokkee
    Posted 3 years ago #

    Thanks, I will mark the topic resolved.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic