• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Updated to 1.0.4 from 1.0.2 (New register user perm issue)

Kainzo

Active member
#1
I just updated and now when someone registers they cant see anything on the forum, it tells them that they dont have permission...

I want new registered users to automatically be in a group that can at least see the public things that 'guests' can see - it was like this before the update but im not sure what broke or what happened =/

Home
Forums>

You do not have permission to view this page or perform this action.

 

Jake Bunce

XenForo moderator
Staff member
#2
Make sure this permission is enabled for the Registered group (group id 2):

Admin CP -> Users -> List User Groups -> Registered -> View
 

Kainzo

Active member
#3
It is set to "allow" for the General Permissions.

When I look at the new user I don't see them as the "Registered" as their primary.. I see them under "Administrative"

However, when I search for all administrative group users only 3 come up (and not the new users).
 

Jake Bunce

XenForo moderator
Staff member
#4
Check the group ids. Registered should be 2. Administrative should be 3. Maybe you renamed them. New users are assigned to group id 2 regardless of the name.

The ids are visible in the URL when you edit a group:

Admin CP -> Users -> List User Groups -> [click a group]

But more generally, you need to check the View permission for all groups to which that user belongs. It must be disabled somewhere for that user.
 

Kainzo

Active member
#5
Strangely enough, I see no user group 2. I've gone through all of them, Administrative is 3 ... Unregistered/Unconfirmed is 1 and Registered is (8) admin.php?user-groups/registered.8/edit

The test user "Hrumph" is has no groups "checked" and the primary display group is "Administrative"
 

Jake Bunce

XenForo moderator
Staff member
#7
Strangely enough, I see no user group 2.
Yeah that's not good. You are missing 2. What about id 4? That should be Moderating.

The software doesn't let you delete the default groups (1-4) so those records must have been lost by some other means. The upgrade should not have resulted in this. Did you perform any other major maintenance lately? A server move, database restore, anything like that? Do you have a backup that you can use?

We can try manually updating the ids by querying your database, but there are several tables involved so that isn't my first choice.

You can also change the id assignments of the default groups but that's an ugly fix:

http://xenforo.com/community/threads/changing-default-group-assignments.16519/
 

Kainzo

Active member
#8
admin.php?user-groups/moderators.12/edit

It doesn't look like 4 is present either.

We didn't do any other major maintenance. We did change the passwords for a database or two but that's it (and reflected the changes in Xen)
 

Jake Bunce

XenForo moderator
Staff member
#11
Ok this is what I have for you:

Code:
UPDATE xf_admin
SET extra_user_group_ids = REPLACE(extra_user_group_ids, '8', '2');

UPDATE xf_moderator
SET extra_user_group_ids = REPLACE(extra_user_group_ids, '8', '2');

UPDATE xf_permission_combination
SET user_group_list = BINARY REPLACE(CONVERT(user_group_list USING utf8), '8', '2');

UPDATE xf_permission_combination_user_group
SET user_group_id = 2
WHERE user_group_id = 8;

UPDATE xf_permission_entry
SET user_group_id = 2
WHERE user_group_id = 8;

UPDATE xf_permission_entry_content
SET user_group_id = 2
WHERE user_group_id = 8;

UPDATE xf_user
SET user_group_id = 2
WHERE user_group_id = 8;

UPDATE xf_user
SET secondary_group_ids = REPLACE(secondary_group_ids, '8', '2');

UPDATE xf_user_group
SET user_group_id = 2
WHERE user_group_id = 8;

UPDATE xf_user_group_change
SET group_ids = REPLACE(group_ids, '8', '2');

UPDATE xf_user_group_relation
SET user_group_id = 2
WHERE user_group_id = 8;

UPDATE xf_user_upgrade
SET extra_group_ids = REPLACE(extra_group_ids, '8', '2');
These queries will replace all references to id 8 with id 2 thereby fixing your Registered groupid.

Backup first. This appears to work in my testing but I guarantee nothing. These are some invasive queries.