Get gamification points on social avatar - refs BT#9901 #TMI

1.10.x
Angel Fernando Quiroz Campos 10 years ago
parent 8e5fc8f72c
commit 5000347932
  1. 15
      main/inc/lib/social.lib.php

@ -1504,10 +1504,21 @@ class SocialManager extends UserManager
$template->assign('socialAvatarBlock', $socialAvatarBlock);
$template->assign('profileEditionLink', $profileEditionLink);
$templateName = 'default/social/user_block.tpl';
if (api_get_setting('gamification_mode') === '1') {
$gamificationPoints = GamificationUtils::getTotalUserPoints(
$userId,
$userInfo['status']
);
$template->assign('gamification_points', $gamificationPoints);
}
$templateName = $template->get_template('social/user_block.tpl');
if (in_array($groupBlock, ['groups', 'group_edit', 'member_list'])) {
$templateName = 'default/social/group_block.tpl';
$templateName = $template->get_template('social/group_block.tpl');
}
$template->assign('social_avatar_block', $template->fetch($templateName));
}

Loading…
Cancel
Save