Support » Plugin: Events Manager » [Plugin: Events Manager] Serious Buddypress user deletion bug

  • Resolved lackingpenguin

    (@lackingpenguin)


    When using the newest version of Events Manager (5.0rc1) with the newest version of Buddypress (1.5.2), you may notice that if you delete a user who has posted no events, ALL upcoming events are deleted too!

    This is because the delete() method of the EM_Events (classes/em-events.php) class will delete all upcoming events if passed an empty array as an argument. This is obviously not the desired behavior.

    To fix, simply replace line 141 of classes/em-events.php:

    if( @get_class(current($array)) != 'EM_Event' ){

    with:

    if( !empty($array) && @get_class(current($array)) != 'EM_Event' ){

    All the best,
    Ben

    http://wordpress.org/extend/plugins/events-manager/

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    Got your mail, thanks for pointing this out!

    avibinamo

    (@avibinamo)

    I see this line is implemented but I still get the same problem when deleting a user. Any suggestions?

    avibinamo

    (@avibinamo)

    I’ve solved it:

    Changed line 144 from:
    elseif{

    To:

    elseif(!empty($array)){

    Thanks!

    agelonwl

    (@angelonwl)

    thanks for sharing.

    per4mance

    (@per4mance)

    Does this bug still exists with Events Manager v5.1.6?

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    I’m pretty sure this was fixed.

    @avibinamo, what file is that?

    per4mance

    (@per4mance)

    @marcus
    Yes it is fixed, I tested it.

    avibinamo

    (@avibinamo)

    @marcus
    The row has changed to the solution suggested above but I still get the same issue when deleting a user that has no posts.

    @per4mance Did you try it on a user without any post/events and etc..?

    per4mance

    (@per4mance)

    @marcus
    I created a user without any post. 5 minutes later I deleted the account, that means, me as a new user deleted the account, not as an admin.

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    will test it out again, but still pretty sure it was fixed

    @avibinamo did you try this with other plugins except EM and BP disabled?

    agelonwl

    (@angelonwl)

    @avibinamo
    I tested it and seems to work fine; also, you might want to try the latest dev version?

    @per4mance
    you can disable user deletion at Buddypress settings > settings > Disable user account deletion?Yes

    per4mance

    (@per4mance)

    @agelonwl
    I know that I can disable user account deletion by users but this is what I find very helpful if a user can decide to delete his account. This creates trust. No other networks do that.

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    @per4mance, I’m confused, is this working as expected now, or not?

    @avibinamo from the looks of it, the problem is limited to you specifically, try my previous suggestion

    per4mance

    (@per4mance)

    @marcus
    For me it’s working fine. Today I’ve got the hint by WordPress a new version of Event Manager has released but I didn’t tested. I do this later.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘[Plugin: Events Manager] Serious Buddypress user deletion bug’ is closed to new replies.