-
Notifications
You must be signed in to change notification settings - Fork 289
Expand file tree
/
Copy pathprofile.php
More file actions
78 lines (78 loc) · 3.23 KB
/
Copy pathprofile.php
File metadata and controls
78 lines (78 loc) · 3.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
/**
* Copyright 2010 - 2019, Cake Development Corporation (https://www.cakedc.com)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2010 - 2018, Cake Development Corporation (https://www.cakedc.com)
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
?>
<div class="users">
<h3><?= $this->Html->image(
empty($user->avatar) ? $avatarPlaceholder : $user->avatar,
['width' => '180', 'height' => '180']
); ?></h3>
<h3>
<?=
$this->Html->tag(
'span',
__d('cake_d_c/users', '{0} {1}', $user->first_name, $user->last_name),
['class' => 'full_name']
)
?>
</h3>
<?php //@todo add to config ?>
<?= $this->Html->link(__d('cake_d_c/users', 'Change Password'), ['plugin' => 'CakeDC/Users', 'controller' => 'Users', 'action' => 'changePassword']); ?>
<div class="row">
<div class="large-6 columns strings">
<h6 class="subheader"><?= __d('cake_d_c/users', 'Username') ?></h6>
<p><?= h($user->username) ?></p>
<h6 class="subheader"><?= __d('cake_d_c/users', 'Email') ?></h6>
<p><?= h($user->email) ?></p>
<?= $this->User->socialConnectLinkList($user->social_accounts) ?>
<?php
if (!empty($user->social_accounts)):
?>
<h6 class="subheader"><?= __d('cake_d_c/users', 'Social Accounts') ?></h6>
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<th><?= __d('cake_d_c/users', 'Avatar'); ?></th>
<th><?= __d('cake_d_c/users', 'Provider'); ?></th>
<th><?= __d('cake_d_c/users', 'Link'); ?></th>
</tr>
</thead>
<tbody>
<?php
foreach ($user->social_accounts as $socialAccount):
$escapedUsername = h($socialAccount->username);
$linkText = empty($escapedUsername) ? __d('cake_d_c/users', 'Link to {0}', h($socialAccount->provider)) : h($socialAccount->username)
?>
<tr>
<td><?=
$this->Html->image(
$socialAccount->avatar,
['width' => '90', 'height' => '90']
) ?>
</td>
<td><?= h($socialAccount->provider) ?></td>
<td><?=
$socialAccount->link && $socialAccount->link != '#' ? $this->Html->link(
$linkText,
$socialAccount->link,
['target' => '_blank']
) : '-' ?></td>
</tr>
<?php
endforeach;
?>
</tbody>
</table>
<?php
endif;
?>
</div>
</div>
</div>