Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

How to delete multiple Activity spam posts?

2»

Comments

  • Just had a look - it seems the spam messages have ActivityUserID of 0, whereas the ActivityID numbers are all individual.

    So that's what I should run through SQL as:

    Delete FROM GDN_Activity WHERE GDN_Activity.ActivityUserID = 0 ;`

  • peregrineperegrine MVP
    edited October 2012

    there shouldn't be any userid 0, they should start with 1 and 1 is the first root user usually.

    roleid usually starts with 2 being guest

    http://vanillaforums.org/discussion/comment/157731/#Comment_157731

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • And that worked!

    I had visions of me buying a new mouse to click through the thousands of pages, many thanks @peregrine

  • GDN_UserID is the table which identifies a UserID of 0. It has RoleID 1, and another underneath with RoleID 2.

    But i'm guessing this is a relic of when I moved my Wordpress users to Vanilla.

  • peregrineperegrine MVP
    edited October 2012

    GDN_UserID is the table which identifies a UserID of 0. It has RoleID 1, and another underneath with RoleID 2.

    in GDN_User table
    there shouldn't be any userid 0, user id should start with 1
    and userid 1 is the first root user (or probably should be).

    usually (the user you initially installed vanilla with).

    probably best to back up user table and

    then delete user id 0's - and see.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • I'll do that too. Again, thanks for your help it has been invaluable as always

  • peregrineperegrine MVP
    edited October 2012

    thanks. good luck on the cutting edge. you still might file the problem on github if you get the same issue on a new van2.1 install as far as guests posting in activity.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @OnlyAnExcuse

    the other odd thing is that you said your user table had two userids.
    this theoretically shouldn't be possible if you have userid as the primary key
    and it should also autoincrement. You've broken two rules here.

      ->Column('UserID', 'int', FALSE, 'primary')
    
    
    PRIMARY BTREE   Yes No  UserID  5   A
    
    Field   Type        Null    Default     Extra
    UserID  int(11)         No  None    auto_increme
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • @OnlyAnExcuse
    same with userrole table which is the one that maps id to role

        Keyname Type    Unique  Packed  Field   Cardinality Collation   
        PRIMARY BTREE   Yes     No      UserID  6           A       
                                        RoleID  6           A
    

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • OnlyAnExcuseOnlyAnExcuse ✭✭
    edited October 2012

    Here's a screenshot of the RoleID's I meant, from GDN_UserRole.

    image

    Firstly, user account UserID 0 is there twice, with RoleID 1 and 2. (RoleID 2 is Guest in GDN_Role, RoleID 1 doesn't exist there.)

    Secondly, each user who isn't a moderator/admin/applicant/confirm email has both RoleID 5 and 8 assigned. Again, 5 doesn't exist in GDN_Role, 8 is the role of a normal member.

    I realise it is possible to designate multiple user roles in the dashboard - but there seems to be RoleID's 5 for everyone. RoleID 5 doesn't exist under GDN_Role. The only additional RoleID i've added via Dashboard is "Yellow card" (assigned the value of 33 in GDN_Role), which is for users who have been warned by moderators. At present there are none with this role.

  • OnlyAnExcuseOnlyAnExcuse ✭✭
    edited October 2012

    Furthermore, this doesn't apply to user ID's after 256. Every one after UserID 256, up to the final one numbered 438, has a RoleID value of 8 (Member).

    Again, could this be a thing caused by moving a Wordpress user database into the forum? It's possible those prior to 256 were members of my forum which was BBPress before.

    Edit - checked a fresh install of Vanilla which i'm testing now, it has:

    image

  • peregrineperegrine MVP
    edited October 2012

    if it were me I would identify who i want to be admin, moderator, member, applicant,confirm, guest, and yellow card. And remove all roleid's from the userrole table that didn't pertain to those numbers. I would also remove userid 0
    from any tables it exists in - e.g. user and userrole, activity, etc.

    Delete FROM GDN_UserRole WHERE RoleidID = 1;
    Delete FROM GDN_UserRole WHERE RoleidID = 5;

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • That's what i've done in the relevant tables, thanks.

    Also found a RoleID of 1 four times in GDN_Permissions, for permissions 18, 19, 40 and 41.

    I'll leave them for now and check them against the clean install of Vanilla I made earlier.

  • @OnlyAnExcuse I'll send you a PM soon.
    There are a couple of things going on and a few need to be made aware to the gitHub bug list.
    As usual, peregrine's advices are very valuable.
    Do you really want to hold a good cleanup in your DataBase? Maybe this is the start of another great plugin :-P You transferred the users from WordPress to Vanilla manually, correct?

    There was an error rendering this rich post.

  • http://vanillaforums.org/discussion/19139/plans-for-bbpress-2-0-converter#latest

    IIRC i'd set up BBPress 1.x, imported Wordpress users into it via CSV, then ported that using the Vanilla porter.

    After that, I assigned user roles using SQL to give all but myself a member's role. Moderators were assigned roles via Vanilla later.

    A slightly haphazard way of doing things, but it worked - though the user's passwords weren't converted and they had to be sent through a forgotten password link.

    Since then, i've exported/imported all the forum's info from 2.0.18 to 2.1.

Sign In or Register to comment.