Home arrow Forum Changing the User Group of a Large Number of Users
  Welcome, Guest. Please login or register.
Did you miss your activation email?
December 02, 2008, 06:47:28 AM
Home New Posts Search Calendar


Login with username, password and session length
+  Joomla Forum
|-+  General Discussion
| |-+  Techies Zone (Moderator: johnny)
| | |-+  Changing the User Group of a Large Number of Users
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Changing the User Group of a Large Number of Users  (Read 2043 times)
stimulus
Joomla Newbie
*

Karma: +0/-0
Offline Offline

Posts: 1


View Profile
Changing the User Group of a Large Number of Users
« on: April 13, 2006, 12:59:40 AM »

Hi,
I need to change about 2000 "authors" to "registred users". I've looked at the SQL tables, but I'm not getting anywhere in terms of figuring out what entries I'd need to modify in order to change their user type. If someone knows what I'd have to modify in the database to change a user's group, I think I can figure out how to search for the authors and make them registered users. Of course, if someone wants to give me the SQL query, I'd be even more grateful. 

More info...
When our non-profit first started using Mambo, we wanted all of our members to be Authors so they could submit content. That hasn't proven to be useful, as members aren't creating content. Now, it makes more sense to have regular members be registered users, so that we can have three levels of access to front-end content and features. As it is now, I can't restrict menu links or content to those who actually need those items, because everyone on our site is "special".

Thanks!
Michelle Castle
Logged
joomlanewbie
Joomla Master
***

Karma: +20/-5
Offline Offline

Posts: 145


View Profile
Re: Changing the User Group of a Large Number of Users
« Reply #1 on: April 13, 2006, 05:15:46 AM »

BACKUP BACKUP BACKUP YOUR DATABASE!

Use phpmyAdmin to backup the following tables:
 jos_core_acl_groups_aro_map 
 jos_core_acl_aro
 jos_users

*Note "jos_" will equal "mos_" if you are using MAMBO
---------------------------


Relationships
JOS_users (KEY FIELD =ID) important field ('usertype')
usertype will be one of..

Registered
Author
Editor
Publisher
Public Backend
Manager
Administrator
Super Administrator

Each one of those possible MEMBER GROUPS is represented in the following file as follows
jos_core_acl_aro_groups


Key field here is 'group_id'

MAKE A NOTE OF THE GROUP_ID for the 'Author' and the 'Registered' member types (!IMPORTANT)
We want to change occurences of Author to Registered

Take note of  jos_core_acl_aro
Each member has an entry in that file and each user has an aro_id that is the field that ultimates determines what type of user it is, as it links into the following file jos_core_acl_groups_aro_map

finally,
jos_core_acl_groups_aro_map

Key fields: the aro_id which points back eventually to the actuall USER
Group_id: which points back to the actual usertype in jos_core_acl_aro_groups


So your UPDATE statement (if you are daring enough to have proceeded this far) will change all the group_id in jos_core_acl_groups_aro_map from AUTHOR_Code to REGISTERED_code

 
Quote
UPDATE `jos_core_acl_groups_aro_map` 
set group_id = ID_Number_that_identifies_Registered_Group
where group_id= ID_Number_that_identifies_Author_Group


UPDATE Jos_users
set usertype ='Registered'
where usertype='Author'

TAKE YOUR JOOMLA INSTALLATION OFFLINE before you apply the changes.
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  



Login with username, password and session length

Powered by MySQL Powered by PHP Joomla Forum | Powered by SMF 1.1 RC1.
© 2001-2005, Lewis Media. All Rights Reserved.
Joomla Bridge by JoomlaHacks.com
Valid XHTML 1.0! Valid CSS!

Joomla Hacks is a Joomla Components, Joomla Modules, Joomla Templates, & Joomla Mambots resource portal. None of the text or images in this public website may be copied without the expressed written consent of the authors. Copyright 2005 by JoomlaHacks.com. Powered by Joomla. All rights reserved.
Terms of Use
Joomla Hacks



Joomla Hacks
German Lang French Lang Italian Lang Spanish Lang Japanese Lang Chinese Lang
Search Contact About Advertise Blogs Topsites Submit News Register Login