Changes of the last few months including restructuring system from using only ranks to permissions
This commit is contained in:
@@ -55,10 +55,11 @@
|
||||
];
|
||||
$loginMethod = $loginMethods[$user['login_method']];
|
||||
|
||||
$date_created = strtotime($user['date_created']);
|
||||
$last_login = strtotime($user['lastLogin']);
|
||||
$date_created_str = DateTimeHumanizer::difference(new \DateTime(), new \DateTime("@$date_created"), "de_DE");
|
||||
$last_login_str = DateTimeHumanizer::difference(new \DateTime(), new \DateTime("@$last_login"), "de_DE");
|
||||
$dateCreated = strtotime($user['date_created']);
|
||||
$lastLogin = strtotime($user['lastLogin']);
|
||||
$dateCreatedStr = DateTimeHumanizer::difference(new \DateTime(), new \DateTime("@$dateCreated"), "de_DE");
|
||||
if($lastLogin)
|
||||
$lastLoginStr = DateTimeHumanizer::difference(new \DateTime(), new \DateTime("@$lastLogin"), "de_DE");
|
||||
?>
|
||||
<tr>
|
||||
<td>
|
||||
@@ -76,9 +77,9 @@
|
||||
<?= $user['rankName'] ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $date_created_str ?>
|
||||
<?= $dateCreatedStr ?>
|
||||
<br>
|
||||
(<?= date("d.m.Y H:i", $date_created) ?>)
|
||||
(<?= date("d.m.Y H:i", $dateCreated) ?>)
|
||||
</td>
|
||||
<td>
|
||||
<img src="<?= $user['profile_picture'] ?>?w=50" class="img-fluid rounded"
|
||||
@@ -104,9 +105,9 @@
|
||||
<?= $loginMethod ?>
|
||||
</td>
|
||||
<td>
|
||||
<?= $last_login_str ?>
|
||||
<?= $lastLoginStr ?>
|
||||
<br>
|
||||
(<?= date("d.m.Y H:i", $last_login) ?>)
|
||||
(<?= date("d.m.Y H:i", $lastLogin) ?>)
|
||||
</td>
|
||||
<td>
|
||||
<?= Locale::getDisplayLanguage($user['language'], "de") ?>
|
||||
@@ -114,14 +115,23 @@
|
||||
<?= Locale::getDisplayRegion("-" . $user['country'], 'de') ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if (isset($_SESSION['user']) && $_SESSION['user']['rank'] >= 8 && ($_SESSION['user']['rank'] > $user['rank'] || $_SESSION['user']['rank'] == 10)): ?>
|
||||
<?php if(get_instance()->hasPermission('user.viewDetails')): ?>
|
||||
<a data-toggle="tooltip" data-placement="top" title="" data-original-title="Details" href="<?= base_url('admin/users/details/' . $user['ID']) ?>" target="_blank" class="btn btn-xs btn-default">
|
||||
<i class="fa fa-info-circle"></i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if(get_instance()->hasPermission('user.viewDetails')): ?>
|
||||
<a data-toggle="tooltip" data-placement="top" title="" data-original-title="Einstellungen" href="<?= base_url('admin/users/settings/' . $user['ID']) ?>" target="_blank" class="btn btn-xs btn-default">
|
||||
<i class="fa fa-cog"></i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if(get_instance()->hasPermission('user.ban')): ?>
|
||||
<a data-toggle="tooltip" data-placement="top" title="" data-original-title="Account löschen" onclick="showDeleteModal(<?= $user['ID'] ?>. <?= $user['username'] ?>)" target="_blank" class="btn btn-xs btn-red">
|
||||
<i class="fas fa-user-slash"></i>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
Reference in New Issue
Block a user