Support

Admin Tools

#10173 mported users from other domain cannot login to new domain

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by nicholas on Monday, 26 December 2011 14:56 CST

user54063
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? YES
Have I searched the forum before posting? YES
Have I read the documentation before posting (which pages?)? YES
Joomla! version: 1.7.3
PHP version: 5.3.8
MySQL version: 5.5.1.4
Host: (optional, but it helps us help you)
Admin Tools version: 2.1.14


Description of my issue:

This issue is NOT caused by Admintool! however I bought the software because I thought and still thinks I am having a database/session issue.

I imnported my users (3700) from my old website to the new one but I am not able to login both front end and backed with these users. The only Super user that has access to the new site is the default user with ID 42 so 62 (old admin from Joomla 1.5.2.3) is not able to logon nor does the normal registered users.

Note: the prefix from the old site I renamed to the new one and from the memberslist+ backend all imported users are present.
I searched for 3 days on forums and I learned that maybe my DB was corrupted, I tried repair with Admintool (before that with phpadmin) nothing worked. I tried also repair separately table 'prefix'_session.

Till this morning I was getting also an error:
Warning: mysqli_close() [function.mysqli-close]: Couldn't fetch mysqli in /home/admin/domains/domain.com/public_html/libraries/joomla/database/database/mysqli.php on line 148

I searched on forum and did this fix:
changed Code:
public $dbtype = 'mysqli';

to
Code:
public $dbtype = 'mysql';

Now this error has gone! but still only admin (ID 42) can logon.

I read most of your replies to other users having these kind of problems and I have great respect for your knowledge. Can you help on this issue too? I can provide additional info if it's needed.

Rodster









nicholas
Akeeba Staff
Manager
Hi Rodster,

Importing users is a mighty HARD process. First, you need to import the jos_users table (where jos_ is the prefix of your site, I'm going to refer to it as jos_from now on). You also need to transfer jos_usergroups (contains the group ID to name mapping), jos_user_usergroup_map (maps users to groups) and jos_user_profiles (contains extra fields for users).

If you think that's over and done if you transfer all of that, you're wrong! Remember the jos_usergroups table? Joomla! references these group IDs also in the jos_assets table. However, the jos_assets table also references the IDs of extensions and categories, essentially making everything in Joomla! completely entangled with everything else, at the database level.

Therefore, it is nigh impossible to transfer all the users from ne site to another, unless you create a custom, lossy programme to transfer users but only approximate user group mappings, therefore bypassing the problem caused by the entanglement of the jos_usergroups and jos_assets tables. You can also do that if you muck around with your database tables, but the possibility of killing your site is extremely high. So says the guy who screwed a test Joomla! installation five times before getting such a user transfer semi-operational and deciding that it's an overkill by all means.

In other words, don't try to do what you're doing right now, you will only break your site :)

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user54063
Hi Nicholas,

The problenm is not the import (excuse my title); the problem is:
all these users cannot login! Only the super uers from the new Joomla 1.7 using ID 42! The other admin users (62) cannot login, other registered users neither.

jos_user was allready imported. The other tables you are referring too I did not import. Do you think that's causing them to fail to login?

Greetz

Rodster

nicholas
Akeeba Staff
Manager
As I implied in my previous reply (but I didn't spell out, you are right), unless you transfer all of the aforementioned tables your users will be unable to log in. More specifically, if a user entry in jos_user does not have one or more entries in the jos_user_usergroup_map table then Joomla! has no idea which user groups the user belongs to. When Joomla! does not know which groups the user belongs to, it assumes it belongs to none. Since the login privilege is something belonging to groups (you can actually create user groups which deny login – totally pointless but perfectly possible) , having users assigned to no group means that they do not have the login privilege and Joomla! will deny logging them in.

So yes, not importing this table is most certainly the reason of the users not being able to log in.

Let me make it a bit easier for you to understand. Your site is like an office building. A jos_user entry is like a person. Now, we need a way to tell our building's security system where each user can and can not go. Obviously, we don't want the warehouse workers having access to the vault, or the accounting secretary having access to the engineer's restroom, right? Imagine that jos_usergroups entries are keycards. jos_usergroup_user_map entries tell us who has which keycard and, by extent, where he's allowed to go. What you did is that brought a bunch of people to the building, but gave them no keycards, so they're stuck outside, staring at the locked doors without a way to get in.

Welcome to the brave new world of ACLs :)

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user54063
Clearly explained however I checked my old DB and I dont see jos_user_usergroup_map table, jos_assets tables or jos_user_usergroup :( only jos_user which I've allready imported.

The guyz @ Jomsocial told me a few days ago:
import record from table akb_users and export it to your newest database (via phpmyadmin)
3. import all records from tables akb_community_* and export it to your newest database (via phpmyadmin)

So they didn't mention the other tables either.
My 'old' website is up and running so it is strange, very strange since I am able to login there.

I will ask the Jomsocial guys further to look into this.

nicholas
Akeeba Staff
Manager
Is by any chance your old site a Joomla! 1.5 site? Because the aforementioned tables are always present on a Joomla! 1.6/1.7/2.5 site, but do not exist on a Joomla! 1.5 site (these tables are required for the ACL feature which was introduced in Joomla! 1.6 BETA1 in late May 2010).

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user54063
Nicholas,

Thanks for your quick response indeed my old site is J 1.5 and the new one 1.7.............

How can I fix this?

nicholas
Akeeba Staff
Manager
The only method which doesn't require you to be a Joomla! expert is using a tool like jUpdate (free) or SPUpgrade (paid) to migrate most of the content from your Joomla! 1.5 site to a new Joomla! 1.7 site. Then you can copy over all of the user tables from the new Joomla! 1.7 site to the site you were tinkering with earlier today. Yeah, I know, it's a drag, but remember that Joomla! 1.5 and the 1.6/1.7/2.5 family are essentially two very different pieces of software, especially when it comes to user management.

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

user54063
Yes i read about those components also; I will check them out.
FYI all other tables from other components (articles,menus etc)were succesfully imported. Those extension will install J 1.7 again which I allready did (without solving the problem)

But...thanks again for your advice.

Rodster.

nicholas
Akeeba Staff
Manager
All of the other components do not (yet!) use the new Joomla! ACL system, that's why importing the tables mostly work. Not all components will work properly when you do that, though. For instance, K2 will not work. Moreover, the table copy doesn't address the huge differences in the way ACLs are being handled by Joomla!, hence your problems. Yes, it's a very good idea to take a look at jUpdate, SPUpgrade and their likes :)

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!