コード例 #1
0
ファイル: friends.php プロジェクト: r-bansal/janeswalk-web-1
?>
</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>
コード例 #2
0
ファイル: properties.php プロジェクト: Mihail9575/concrete5
		<?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']);
    ?>
コード例 #3
0
ファイル: controller.php プロジェクト: remo/social
 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);
         }
     }
 }