User: Use $query->hasResult() instead of $query->count()

refs #9632
This commit is contained in:
Johannes Meyer 2015-08-03 16:28:43 +02:00
parent 3b36009122
commit 7bd8b4b19a
1 changed files with 9 additions and 3 deletions

View File

@ -52,7 +52,12 @@ if ($this->hasPermission('config/authentication/users/edit') && $backend instanc
<?php endif ?>
</div>
<div class="content memberships">
<?php if (count($memberships) > 0): ?>
<?php
$firstRow = true;
foreach ($memberships as $membership): ?>
<?php if ($firstRow): ?>
<?php $firstRow = false; ?>
<table data-base-target="_next" class="action membership-list alternating">
<thead>
<tr>
@ -61,7 +66,7 @@ if ($this->hasPermission('config/authentication/users/edit') && $backend instanc
</tr>
</thead>
<tbody>
<?php foreach ($memberships as $membership): ?>
<?php endif ?>
<tr>
<td class="membership-group">
<?php if ($this->hasPermission('config/authentication/groups/show') && $membership->backend instanceof Selectable): ?>
@ -86,7 +91,8 @@ if ($this->hasPermission('config/authentication/users/edit') && $backend instanc
<?php endif ?>
</td>
</tr>
<?php endforeach ?>
<?php endforeach ?>
<?php if ($memberships->hasResult()): ?>
</tbody>
</table>
<?php else: ?>