Group Mods

  • Profile picture of @mercime
  • Profile picture of r-a-y
  • Profile picture of Hugo

Fatal Error when trying to Delete User (18 posts)

Started 1 year, 11 months ago by: Pisanojm

  • Profile picture of Pisanojm Pisanojm said 1 year, 11 months ago:

    I am getting this error when trying to delete a user… Using latest 1.2x Branch Build 3067 (not 1.2.4.1) and WordPress 3.0.

    Fatal error: Using $this when not in object context in /home/musicpln/public_html/wp-content/plugins/buddypress/bp-groups/bp-groups-classes.php on line 1053

    This happens when pressing the “confirm deletion” button. I have tried this with every plugin disabled except Buddpress and I still get the error. If I turn off the Buddypress plugin, I CAN delete the user as normal….

  • Profile picture of Michael Sumner Michael Sumner said 1 year, 10 months ago:

    Open the file mentioned, and replace this:

    $group_ids = $this->get_group_ids( $user_id );

    with this:

    $group_ids = BP_Groups_Member::get_group_ids( $user_id );

    And right below that, replace this:

    foreach ( $group_ids->groups as $group_id ) {

    with this:

    foreach ( $group_ids['groups'] as $group_id ) {

    That fixed the issue for me.

  • Profile picture of Pisanojm Pisanojm said 1 year, 10 months ago:

    $group_ids = $this->get_group_ids( $user_id ); is on LINE 2105
    foreach ( $group_ids->groups as $group_id ) { is on LINE 2107

    I can CONFIRM this fix has worked for me. @r-a-y

  • Profile picture of Pisanojm Pisanojm said 1 year, 10 months ago:

    Thanks @dnmedia

  • Profile picture of John James Jacoby John James Jacoby said 1 year, 10 months ago:

    Can we get a ticket for 1.2.6 about this if there isn’t one?

  • Profile picture of r-a-y r-a-y said 1 year, 10 months ago:

    It’s already up ;)

    http://trac.buddypress.org/ticket/2479

  • Profile picture of John James Jacoby John James Jacoby said 1 year, 10 months ago:

    You all rock :)

  • Profile picture of josh101 josh101 said 1 year, 10 months ago:

    I also used this 5 hours ago then deleted 49 spam users so you can bet your *** it works!

  • Profile picture of rossagrant rossagrant said 1 year, 10 months ago:

    Thanks so much for this, works a treat!

  • Profile picture of newrambler newrambler said 1 year, 10 months ago:

    Yes, that works! Yay and thank you so much!

  • Profile picture of John James Jacoby John James Jacoby said 1 year, 10 months ago:

    Fixed in branch. Thanks!

  • Thanks! I was seeing the error when marking users as spam. Works properly now.

  • Profile picture of archondigital archondigital said 1 year, 10 months ago:

    same here, error got fixed, thanks!!!

  • Same here, problem fixed. Appreciate the work. :)

  • Profile picture of tyr tyr said 1 year, 10 months ago:

    Worked for me as well! Thanks for the fix!