Users can’t be displayed—import users into joomla

by j2trip on October 6th, 2009

In the previous post, I have imported 300 users into jos_users. But at the back admin, the users is still same with the old. But the users account seem right.

Why the users can’t bu displayed?

I studied the source code of users manager for back admin. I found the users list is related with two others table, one is jos_core_acl_aro and the other is jos_core_acl_groups_aro_map. You may do a test, when you create a new user at back admin. One record will be inserted into the two tables also.  It seems the two tables is sotre the group of users. So we need to insert users group data into the two tables.

Step 1.  Generate the data of the table of jos_core_acl_aro

There are 6 fields in this table id, section_value,value,order_value,name and hidden.

id: it isn’t same with users id in jos_users, it is the number of this table.

section_value: According to the new created users, its group is Registered and the value of this field is “users”. So I set this field to  “users”.

value: This field is users id, it must same with users id in table jos_users.

order_value: For the new created user, this value is set to “0″, so I set this field to “0″ also.

name: Users’ name, same with jos_users.name .

hidden: Set this field to “0″ with the value of new created user also.

I generate all data in Excel.

20091006-joomla-users-can-not-displayed-1

Step 2.  Generate the data of the table of jos_core_acl_groups_aro_map

There are 3 fields in this table group_id:section_valuearo_id.

group_id: The group which users belong.

section_value: Keep blank same with the value of new created users.

aro_id: Same with the value of the id in table jos_core_acl_aro. You may copy the column from the Excel sheet of jos_core_acl_aro.

Then excel sheet:

20091006-joomla-users-can-not-displayed-2

Step 3. Import the excel sheet data into the table of  jos_core_acl_aro and jos_core_acl_groups_aro_map in MySql.

When you import these data into MySql, must make sure the old value won’t be overwrite.

The data imported like this:

20091006-joomla-users-can-not-displayed-2-1

20091006-joomla-users-can-not-displayed-2-2

Step 4: When I come to back admin, all users been displayed!

20091006-joomla-users-can-not-displayed-3

After checked all users, I come to the front page to login. But I can’t login, and following windows pop-up.

20091006-joomla-users-can-not-displayed-4

It seemed there was some error on users data imported. I realized I used Community Builder. The login module is CB’s also. So it need to import the necessary data of Community Builder also.

To be continued……

Comments 0

Leave a Reply:(* means required)

Name*:

Email*:
(will not be published)

Website:

Your comment*: