XF 1.1 Permissions Issue

Donnie La Curan

Active member
I have 2 user groups. The first one is the Registered group that is default. The next group is a Members group. I set up a User Group Promotion so that when a user hit 5 posts they were placed in the Members group.

The only difference between these 2 groups is the permissions on 2 forums. Registered are not allowed to start threads in these 2 forums. Members can start threads.

This appeared to be working as I've had a test account under 5 posts and it was not able to post. I have looked at the forum as other users who have over 5 posts and they can post. Today I had a user ask me why they can't post in those forums. I looked and they are in the Registered group and secondary Members. They have 285 posts. They don't have any special permissions.

I can't see why this one user can't get in. Is there something I am doing wrong?

edit: I am testing permissions on other users and I am seeing the same problem. So some users can start threads and others can't. Though they all appear to have the same permissions.

edit: I looked in the database and I can see a lot of users who are not in the secondary Members group who have over 5 posts.


XenForo moderator
Staff member
I have encountered problems with incorrect permissions related to imported users before.

Are you comfortable with working in the database?
If so you can check the xf_user table and compare the records of two members; one which is working and one which isn't.
If the user_group_id, secondary_group_ids and permission_combination_id fields are the same then at least you can rule that out.

Donnie La Curan

Active member
This query shows 124 users:
SELECT * FROM `xf_user` where secondary_group_ids like '%11%'

This query shows 6,452 users:
SELECT * FROM `xf_user` where user_group_id = 2 and secondary_group_ids = '' and message_count >= 5

Most of the users are not in the appropriate group. Shouldn't all of these users be in the secondary group?

I queried 3 different users.

User 1 - user_group_id = 2, secondary_group_ids = 11, permission_combination_id = 25
User 2 - user_group_id = 2, secondary_group_ids = blank, permission_combination_id = 2
User 2 - user_group_id = 2, secondary_group_ids = 11, permission_combination_id = 25

Actually now that I am looking at it more. The threads I am seeing are from before I imported. Nobody can start a new thread. People can only reply.

Donnie La Curan

Active member
I think the permission_combination_id is incorrect.

I changed it on one user to equal all of the users group ids added together and they have permission.

I am not entirely sure that's how it works or not. But changing that number to 13 instead of 25 worked.

edit: I just tried editing a user. I removed their secondary group and looked, permission_combination_id went to 2. Then I edited them again and refreshed the database and permission_combination_id went back to 25.

Donnie La Curan

Active member
I looked in this table xf_permission_combination_user_group and see a bunch of entries for the same user_group_id.


Donnie La Curan

Active member
I think part of this is resolved. The permissions part of it.

I thought that since the Member group was allowed to start threads that it would apply to the forums that I said Registered could not start threads. So I applied a node permission for the Member group to allow start threads on those 2 forums and now they can.

However, I still have a problem with the number of users in the Members group. I updated the promotion to only promote those people in the Registered group ... which covers everyone it should. According to the query I posted above, I still have 6,452 users who should be in that group but are not. After I updated the permission I ran the cron to update permissions. No change.

So the users in the Members group can now post in the 2 forums. However, there are still ~6400 users who should be able to but can't.

Can I just run a query to update their records to match a user who does have permission? If I do will it get set back when the user group promotion runs?

Donnie La Curan

Active member
So I did a search in the users area for the same criteria as the promotion and it comes back with the number of users that should be in that group, ~6500.

Wonder why the promotion isn't working for most users.