Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Plugin won't activate with lots of users #13

@haroldkyle

Description

@haroldkyle

We have about 12,000 users on our blog, so the plugin hangs for a long time upon activation. Eventually memory is exhausted as the activation cycles through Groups_User_Group::create() within Groups_Registered::activate(). The only way I could successfully activate the plugin was by commenting out the foreach over all users. I followed this up with an SQL query to make sure all the blog's users were added to the Registered group:

insert ignore into wp_3_groups_user_group 
select ID, 1 from wp_users u
join wp_usermeta um on um.user_id = u.ID and um.meta_key = 'wp_3_capabilities';

Perhaps (if this indeed is what the plugin does here) you could take a similar approach, which in my case only took 0.15 seconds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions