Kunena / com_kunenaimporter

Import component for Kunena on Joomla
https://www.kunena.org
10 stars 14 forks source link

exportCreateUsers doesn't work right #46

Closed nbaksalyar closed 13 years ago

nbaksalyar commented 13 years ago

Hello, It seems that currently users export doesn't work at all. Here's explanation:

// We're importing users from the import table. If I get it right, the column 'id' should be NULL at this moment. $query = "SELECT * FROM #__kunenaimporter_users ORDER BY extid";

// loadObjectList($key) - Joomla docs says the following: "If $key is not empty then the returned array is indexed by the value the database key. $extusers = $db->loadObjectList ( 'id' );

// Hence all results are indexed by NULL, literally in code: // foreach ($users as $user) { // $users[null] = $user; // }

What I think it should look like:

$extusers = $db->loadObjectList ( 'extid' );

So the code will be:

foreach ($users as $user) { $users[$user->extid] = $user; }

mahagr commented 13 years ago

I will take a look into this soon. Thanks!