Skip to content

Commit

Permalink
Ticket #4809 - Accounts: Wrong profiles in Profiles column.
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonLV committed Sep 23, 2024
1 parent 6d4935a commit 04a2842
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions modules/boonex/accounts/classes/BxAccntTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,16 @@ public function getProfilesByAccount($aContentInfo, $iMaxVisible = 2, $iMaxInPop
$aProfiles = array_slice($aProfiles, 0, $iMax);

$i = 0;
foreach ($aProfiles as $iProfileId => $aProfile) {
$oProfile = BxDolProfile::getInstance($iProfileId);
foreach ($aProfiles as $aProfile) {
$oProfile = BxDolProfile::getInstance((int)$aProfile['id']);
if(!$oProfile)
continue;

$iId = $oProfile->id();
$sName = $oProfile->getDisplayName();
$aTmplVarsProfile = [
'html_id' => $this->_oConfig->getHtmlIds('profile') . $aProfile['id'],
'id' => $oProfile->id(),
'html_id' => $this->_oConfig->getHtmlIds('profile') . $iId,
'id' => $iId,
'url' => $oProfile->getUrl(),
'name' => strmaxtextlen($sName, $CNF['PARAM_PROFILE_NAME_LENGTH_MAX'], '...'),
'name_attr' => bx_html_attribute($sName)
Expand Down

0 comments on commit 04a2842

Please sign in to comment.