Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
activity.phtml
Go to the documentation of this file.
1 <?php
14 $sessionInfoCollection = $block->getSessionInfoCollection();
15 ?>
16 <header>
17  <div class="page-title-wrapper">
18  <h1 class="page-title" align="center"><?= $block->escapeHtml(__('Account Activity')) ?></h1>
19  <?php
20  if ($block->areMultipleSessionsActive()) {
21  echo $block->escapeHtml(__(
22  'This administrator account is open in more than one location. '
23  .'Note that other locations might be different browsers or sessions on the same computer.'
24  ));
25  } ?>
26  </div>
27 </header>
28 
29 <div class="page-content">
30  <?= $block->getLayout()->getMessagesBlock()->getGroupedHtml() ?>
31  <div>
32  <div class="information-title"><?= $block->escapeHtml(__('Concurrent session information:')) ?></div>
33  <table cellspacing="0" border="1" class="information-table">
34  <thead>
35  <tr>
36  <th><?= $block->escapeHtml(__('IP Address')) ?></th>
37  <th><?= $block->escapeHtml(__('Time of session start')) ?></th>
38  </tr>
39  </thead>
40  <tbody>
41  <?php
42  foreach ($sessionInfoCollection as $item): ?>
43  <tr>
44  <td><?= $block->escapeHtml($item->getFormattedIp()) ?></td>
45  <td><?= $block->escapeHtml($block->formatDateTime($item->getCreatedAt())) ?></td>
46  </tr>
47  <?php
48  endforeach;
49  ?>
50  </tbody>
51  </table>
52 
53  <div class="button-container">
54  <button type="button"
55  <?php
56  if ($block->areMultipleSessionsActive()): ?>
57  data-mage-init='{"confirmRedirect":{
58  "message": "<?=
59  $block->escapeJs(__('Are you sure that you want to log out all other sessions?'))
60  ?>",
61  "url":"<?=
62  $block->escapeJs($block->escapeUrl($block->getUrl('security/session/logoutAll')))
63  ?>"
64  }}'
65  <?php
66  else: ?>disabled<?php
67  endif ?>
68  title="<?= $block->escapeHtmlAttr(__('Log out all other sessions')) ?>">
69  <?= $block->escapeHtml(__('Log out all other sessions')) ?>
70  </button>
71  </div>
72 
73  <div><?= $block->escapeHtml(__('This computer is using IP address %1.', $block->getRemoteIp())) ?></div>
74  </div>
75 </div>
$sessionInfoCollection
Definition: activity.phtml:14
if( $form)() ?>< script > require(['jquery' mage mage
Definition: save.phtml:15
__()
Definition: __.php:13
$block
Definition: block.php:8
if($block->areMultipleSessionsActive()) foreach( $sessionInfoCollection as $item)( $item->getFormattedIp()) ?></td >< td ><? endforeach
Definition: activity.phtml:42
endif
Definition: 404.phtml:116