members not in a group

Get help with installation and running phpBB 3.1.x here. Please do not post bug reports, feature requests, or extension related questions here.
Anti-Spam Guide
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: phpBB 3.1.x is at its End of Life stage and support will NOT be provided after July 1st, 2018.
Locked
testingground
Registered User
Posts: 124
Joined: Thu Apr 21, 2016 10:59 am

members not in a group

Post by testingground » Thu Feb 08, 2018 6:12 pm

i have an issue that some members (about 80 now) are not in a group.
The dont see the boards when logged in, it just comes up with the message 'no boards to show'
When they contact me I can get them 'back in' by manually putting them in the registered users group.

It happened a while back when I accidentally deleted a group (I think)
Since them Ive been manually searching which members are not in a group. (it was around 300 I think so Ive done quite a few)

myphpadmin shows these users as usergroup 7 which is newly registered users, but they arent actually in that group.

Is there a easier way to put all these members with no group into a group?
Ive got around 3760 members so its getting hard to find the last 80 odd ones

Thanks

User avatar
warmweer
Registered User
Posts: 1437
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Re: members not in a group

Post by warmweer » Thu Feb 08, 2018 7:47 pm

testingground wrote:
Thu Feb 08, 2018 6:12 pm
Is there a easier way to put all these members with no group into a group?
Ive got around 3760 members so its getting hard to find the last 80 odd ones
Not 100% sure about this but AFAIR you can put multiple users into a group in one movement. The problem is you would have to select those users.
However, since all users should be in the registered group anyway (except perhaps those awaiting activation), you could just select all users and add them (nothing will happen to those who are member already).
A bug is a feature that hasn't made it to the manual (yet)

testingground
Registered User
Posts: 124
Joined: Thu Apr 21, 2016 10:59 am

Re: members not in a group

Post by testingground » Thu Feb 08, 2018 8:04 pm

how do you select all users?

User avatar
david63
Jr. Extension Validator
Posts: 15048
Joined: Thu Dec 19, 2002 8:08 am
Location: Lancashire, UK
Name: David Wood
Contact:

Re: members not in a group

Post by david63 » Fri Feb 09, 2018 1:55 am

If you were on 3.2 then my User Details extension would be able to tell you which members were not in a group
David
Remember: You only know what you know and - you don't know what you don't know!
My CDB Contributions | How to install an extension
I will not be accepting translations for any of my extensions in Github - please post any translations in the appropriate topic.
No support requests via PM or email as they will be ignored

testingground
Registered User
Posts: 124
Joined: Thu Apr 21, 2016 10:59 am

Re: members not in a group

Post by testingground » Fri Feb 09, 2018 7:45 am

thanks, that helps

User avatar
KevC
Support Team Member
Support Team Member
Posts: 68466
Joined: Fri Jun 04, 2004 10:44 am
Location: Oxford, UK
Contact:

Re: members not in a group

Post by KevC » Fri Feb 09, 2018 8:59 am

testingground wrote:
Thu Feb 08, 2018 8:04 pm
how do you select all users?
manage groups
Click 'members' next to the reg users group
At the very bottom where there's a box to enter usernames to add, there is a link under it saying 'find a member'. Click that and you can select multiple accounts. If you don't have many on a page you can change the page length with the post settings > topics per page option.
-:|:- Support Request Template -:|:-
Image
Cheap UK Hosting
"In the land of the blind the little green bloke with no pupils is king - init!"

testingground
Registered User
Posts: 124
Joined: Thu Apr 21, 2016 10:59 am

Re: members not in a group

Post by testingground » Fri Feb 09, 2018 12:14 pm

Comes up with an error that users are already members

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

Re: members not in a group

Post by stevemaury » Fri Feb 09, 2018 3:57 pm

This SQL will put all users in the Registered users group who are not already in it. Executing SQL Queries in phpMyAdmin

If your table prefix is not phpbb_ change accordingly. 2 is the default group_id for the Registered users, but check the groups table in your database first to make sure. Backup the user_group table before running this query.

Code: Select all

INSERT INTO phpbb_user_group (group_id, user_id, group_leader, user_pending) SELECT 2, user_id, 0, 0 FROM phpbb_users WHERE user_type <> 2 AND user_id NOT IN(SELECT user_id FROM phpbb_user_group WHERE group_id = 2);
This SQL will remove all phantom users from the Newly registered users group:

Code: Select all

DELETE FROM phpbb_user_group  WHERE group_id = 7 
This SQL will make Registered users the default group for all users whose default group is now Newly registered users. Backup the users table before running:

Code: Select all

UPDATE phpbb_users set group_id = 2 WHERE group_id = 7
And, unless your user_group table is messed up, this SQL will find all users who are not in any group. This may be all you need. Backup first.

Code: Select all

SELECT user_id FROM phpbb_users WHERE user_type <> 2 AND user_id NOT IN(SELECT user_id FROM phpbb_user_group)
For REALLY good and VERY inexpensive hosting CLICK HERE

I can stop all your spam. PM or email me.

All unsolicited PMs will be ignored.

User avatar
warmweer
Registered User
Posts: 1437
Joined: Fri Jul 04, 2003 6:34 am
Location: Van Allen Belt ... well actually Belgium

Re: members not in a group

Post by warmweer » Fri Feb 09, 2018 6:17 pm

testingground wrote:
Fri Feb 09, 2018 12:14 pm
Comes up with an error that users are already members
Is that a real error message preventing the action being exectuted?
Or is that a message stating that some users were already members and could therefore not be added (again)?
A bug is a feature that hasn't made it to the manual (yet)

testingground
Registered User
Posts: 124
Joined: Thu Apr 21, 2016 10:59 am

Re: members not in a group

Post by testingground » Fri Feb 09, 2018 6:57 pm

prevents it being actioned

Locked

Return to “[3.1.x] Support Forum”

Who is online

Users browsing this forum: No registered users and 21 guests