How to add all users with at least 1 post to a group?

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Anti-Spam Guide
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
no_comment
Registered User
Posts: 67
Joined: Sat Dec 27, 2014 11:17 pm
Location: Hell
Contact:

How to add all users with at least 1 post to a group?

Post by no_comment »

Hi!

I need the SQL command for adding all users with at least one message to a group.
Thanks.

Regards,
DANIEL
User avatar
Ibedejo
Registered User
Posts: 243
Joined: Tue Feb 21, 2012 12:12 am

Re: How to add all users with at least 1 post to a group?

Post by Ibedejo »

You may consider checking Auto Groups first.

Edit:
correct URL => https://www.phpbb.com/customise/db/mod/auto_groups/ to the 3.0 MOD.
no_comment
Registered User
Posts: 67
Joined: Sat Dec 27, 2014 11:17 pm
Location: Hell
Contact:

Re: How to add all users with at least 1 post to a group?

Post by no_comment »

Ibedejo wrote:You may consider checking Auto Groups first.

Edit:
correct URL => https://www.phpbb.com/customise/db/mod/auto_groups/ to the 3.0 MOD.
Hi and thanks for the reply!

I have that MOD, but it seems to add users to the group only after new e-mail, and not the people wich have posted in the past. Only I have posted since MOD instalation, and I am the only member of the group so far.
Please, help me.
Thank you.

Regards,
DANIEL
User avatar
Ibedejo
Registered User
Posts: 243
Joined: Tue Feb 21, 2012 12:12 am

Re: How to add all users with at least 1 post to a group?

Post by Ibedejo »

IIRC rules were set up based on one of these parameters:
- min/max days of membership
- min/max post count
- min/max warning points

As I no longer run any 3.0 test boards it's hard to give any definite advice, sorry.
It might help re-syncing statistics in ACP > General - at least it can't hurt ;)

btw: what is it you want to achieve by adding each user to a new/separate group with the submission of their very first post?
no_comment
Registered User
Posts: 67
Joined: Sat Dec 27, 2014 11:17 pm
Location: Hell
Contact:

Re: How to add all users with at least 1 post to a group?

Post by no_comment »

Hi!

I have resynchronized statistics, but no change. :(
I do not want every user in a separate group. I want ALL USERS with at least one message in the SAME GROUP.
I need this because I want to send a mass e-mail to only 2000 users wich have posted and not all my 55.000 members as it is too much.
Are you sure there is no SQL command for doing what I want?

Regards,
DANIEL
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52767
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: How to add all users with at least 1 post to a group?

Post by stevemaury »

Create the group. Determine its group_id by hovering over the Settings option in Manage groups and looking in the browser status bar, lower left, for the value of g= at the end of the status bar line. Then Substitute that value for X in this query:

Code: Select all

INSERT INTO phpbb_user_group (group_id, user_id, group_leader, user_pending) SELECT X, user_id, 0, 0 FROM phpbb_users WHERE user_id IN(SELECT user_id FROM phpbb_users WHERE user_lastpost_time > 0);
If your table prefix is not phpbb_, change accordingly. Back up the user_group table first. Not tested.
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
no_comment
Registered User
Posts: 67
Joined: Sat Dec 27, 2014 11:17 pm
Location: Hell
Contact:

Re: How to add all users with at least 1 post to a group?

Post by no_comment »

Thank you, stevemaury.

The SQL query worked but not completly. It added only 1053 users to the group and not all 2327. What could be the problem?
Here is the MODs I have installed:
Hide Sub-Sub Forums on Index
Increase Forum Rules limit
Latest Topic Title 1.1.6
Instant post redirect 1.0.4
Private Message Moderation 1.5.4
Instant login redirect
BBcode Buttons and Smilies for Quick Reply 1.1.0
Login After Register 1.0.0 [3.0.5]
Display Quick Reply by default
Show quick reply to guests
Site name in e-mai from field 1.0.1
Username and Q&A in Quick Reply
Top Posters on Index 1.0.0.a [3.0.1]
Auto Groups 1.0.2 [3.0.6]

I hope this issue is resolved soon because support for v3.0 will end soon. :(
Regards,
DANIEL
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52767
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: How to add all users with at least 1 post to a group?

Post by stevemaury »

Only thing I can think of is they had their post deleted? Because if they have no user_lastpost_time, they have no posts.

How are you determining that there are 2327 users who have at least one post?
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
no_comment
Registered User
Posts: 67
Joined: Sat Dec 27, 2014 11:17 pm
Location: Hell
Contact:

Re: How to add all users with at least 1 post to a group?

Post by no_comment »

groups.png
Hi!

Because the MOD "Auto Groups" added 2327 users to a group on a test board on my computer (using XAMPP). But, for some reason, the same MOD did not add any users to my live board. I set the group the same way: users with minimum one post.

Regards,
DANIEL
User avatar
stevemaury
Support Team Member
Support Team Member
Posts: 52767
Joined: Thu Nov 02, 2006 12:21 am
Location: The U.P.
Name: Steve
Contact:

Re: How to add all users with at least 1 post to a group?

Post by stevemaury »

Perhaps Auto group uses some different criterion. If it works on Xampp, it should work live. You need to ask in that MODs support topic.
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)
Locked

Return to “[3.0.x] Support Forum”