I have about 25 pages of users and several random ones have been orphaned is there away i can add them all to a group with out doing everypage manually
UnderDog
mod
I have no solution, but a couple of MySQL selects to figure out more information: All users which do not have a Role in the UserRole table:
select u.UserID from GDN_User u left join GDN_UserRole ur on u.UserID = ur.UserID where ur.UserID is null;
All users with multiple Roles:
select u.UserID from GDN_User u join GDN_UserRole ur on u.UserID = ur.UserID GROUP BY ur.RoleID ORDER BY ur.RoleID DESC;
edit Also figure out exactly what you want to do with which type of users.
For example : For every user that has role 33 I want him to give only role 8 Every user that has role 27 will only get role 33 etcetera etcetera
Answers
Do you want to switch them all to one user.
or do you want to change the role for a select number of users?
what do you mean 25 pages?
if you have access to phpmyadmin
you could just place a check box next to each userid you want to change the role on on update to the new roleid you want. or you could use mysql.
if you really are changing roles - look in UserRole table.
factoid: Most questions have been previously answered, try the search box first, please provide your Vanilla version Number!
Peregrine's Addons - donations gladly accepted for "successful solutions" and addons - kind of like tipping a waiter at a restaurant
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •You'll need to run a bit of SQL. Check out this discussion.
- Spam
- Abuse
- Troll
1 • Off Topic Insightful 1Awesome LOL •I agree with what my neighbours above me said and I have something to add. Figure out why you have 25 pages of users without a Role attached. Did you delete a Role? In that case let us know here please :-)
This fixing of the Users' role could be something interesting to enhance a plugin or core functionality :-)
What to do if I get a Bonk Error?
Vanilla Wiki : Join and help edit our Wiki! | View all Vanilla issues on GitHub | Report a new Vanilla issue on GitHub
Deploying a new Forum and adding a Theme | Give thanks to the Vanilla Developers!
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Sorry i made it unclear, i have 25pages of users, most have a role, however about 15 of the 25 do not. The delete role and migrate to another role button wouldn't work for me so i had to delete without.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Okay from SQL it looks like they are not orphaned they just have multiple role ids, how do i fix this so they only have one?
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •