?> </h1> <?php $friendsData = UsersFriends::getUsersFriendsData($profile->getUserID()); if (!$friendsData) { ?> <div style="padding:16px 0px;"> <?php echo t('No results found.'); ?> </div> <?php } else { foreach ($friendsData as $friendsData) { $friendUID = $friendsData['friendUID']; $friendUI = UserInfo::getById($friendUID); if (!is_object($friendUI)) { ?> <div class="ccm-users-friend" style="margin-bottom:16px;"> <div style="float:left; width:100px;"> <?php echo $av->outputNoAvatar(); ?> </div> <div > <?php echo t('Unknown User'); ?> </div> <div class="ccm-spacer"></div>
<?php $downloadStatsCounter = 0; foreach ($downloadStatistics as $download) { $downloadStatsCounter++; if ($downloadStatsCounter > 20) { break; } ?> <tr> <td> <?php $uID = intval($download['uID']); if (!$uID) { echo t('Anonymous'); } else { $downloadUI = UserInfo::getById($uID); if ($downloadUI instanceof UserInfo) { echo $downloadUI->getUserName(); } else { echo t('Deleted User'); } } ?> </td> <td><?php echo $dateHelper->formatSpecial('FILE_DOWNLOAD', $download['timestamp']); ?> </td> <td><?php echo intval($download['fvID']); ?>
protected function setProfile() { $u = new User(); $ui = UserInfo::getById($u->getUserId()); $ui->setAttribute("{$this->network}_id", $this->user->identifier); if ($ui->getAttribute('first_name') == '') { $ui->setAttribute('first_name', $this->user->firstName); } if ($ui->getAttribute('last_name') == '') { $ui->setAttribute('last_name', $this->user->lastName); } $this->setPicture($ui); if ($this->network == 'linkedin') { $this->auth->api()->setResponseFormat('JSON'); $resp = $this->auth->api()->profile('~:(id,first-name,last-name,industry,positions)'); $profile = json_decode($resp['linkedin']); if (UserAttributeKey::getByHandle('company')) { $company = $profile->positions->values[0]->company->name; $ui->setAttribute('company', $company); } if (UserAttributeKey::getByHandle('title')) { $title = $profile->positions->values[0]->title; $ui->setAttribute('title', $title); } } }