Defect #1172

getting easySDI user with wrong ID

Added by Blatti Yves over 3 years ago. Updated over 3 years ago.

Status:ClosedStart date:11/04/2015
Priority:HighDue date:
Assignee:-% Done:

100%

Category:CORE
Target version:4.3.2
Affected version:4.3.2

Description

Revision 9169 changed sdiUser->getUserById($sdiId) to use a Joomla user ID instead of easySDI user ID.

I have checked and it seems to be wrong. There's two ways of getting an easySDI user from an easySDI user ID: * new sdiUser($anID) * sdiFactory::getSdiUser($anID)

Then I checked the code:

new sdiUser($anID) :
easysdi\com_easysdi_catalog\src\site\controllers\metadata.php lines 849 + 850 (use easySDI id)
easysdi\com_easysdi_shop\src\site\controllers\order.php line 185 (use easySDI id)
easysdi\com_easysdi_shop\src\site\models\order.php line 93 (use easySDI id)

getSdiUser($anID) :
easysdi\com_easysdi_shop\src\site\controllers\basket.php line 279 (use easySDI id)
easysdi\com_easysdi_shop\src\site\controllers\extract.php line 461 (use easySDI id)
easysdi\com_easysdi_shop\src\site\controllers\order.php lines 67 + 136 (use easySDI id)
easysdi\com_easysdi_shop\src\site\helpers\easysdi_shop.php lines 1172 + 1198 + 1237 (use easySDI id)
easysdi\com_easysdi_shop\src\site\models\request.php line 77 (use easySDI id)
easysdi\com_easysdi_shop\src\site\views\order\view.html.php line 43 (use easySDI id)
easysdi\com_easysdi_shop\src\site\libraries\easysdi\sdiBasket.php lines 76 (use easySDI id)

So using a Joomla ID seems to be an error.
We have to correct it in sdiUser class +
easysdi\com_easysdi_shop\src\site\controllers\download.php line 97 (use Joomla id)

I found the error in the other direction here:
C:\projets-ybi\easysdi4dev\joomla\easysdi\com_easysdi_shop\src\site\libraries\easysdi\sdiBasket.php lines 127
$ex->created_by = sdiFactory::getSdiUser($extraction->created_by)->name; -> (use easySDI id => Should use Joomla Id I think)

Once both have been corrected, we sould be good.

History

#1 Updated by Blatti Yves over 3 years ago

  • Status changed from Affected to Resolved
  • % Done changed from 0 to 100

rev. 9182

#2 Updated by Blatti Yves over 3 years ago

  • Status changed from Resolved to To merge
  • Assignee changed from Blatti Yves to Van Hoecke Hélène

#3 Updated by Van Hoecke Hélène over 3 years ago

  • Status changed from To merge to Closed

#4 Updated by Van Hoecke Hélène over 3 years ago

  • Target version set to 4.3.2

#5 Updated by Van Hoecke Hélène over 3 years ago

  • Assignee deleted (Van Hoecke Hélène )

Also available in: Atom PDF