Skip to content

Commit 6831666

Browse files
committed
Highlight possible DB issue - closes #888
This is an edge case. Not clear how the reported ended up with this DB issue but, until we know, this fix will highlight the issue and handle it gracefully.
1 parent 6ce088f commit 6831666

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

‎resources/views/user/index.foil.php‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,13 @@
8080
Multiple (<?= $u['nbC2U'] ?>)
8181
</a>
8282
<?php else: ?>
83-
<a href="<?= route( "customer@overview" , [ 'cust' => $u[ 'custid' ] ] ) ?>">
84-
<?= $t->ee( $u['customer'] ) ?>
85-
</a>
83+
<?php if( !$u['customer'] || !$u[ 'custid' ] ): ?>
84+
<span class="badge badge-warning">DB Issue?</span> User not affiliated to a customer.
85+
<?php else: ?>
86+
<a href="<?= route( "customer@overview" , [ 'cust' => $u[ 'custid' ] ] ) ?>">
87+
<?= $t->ee( $u['customer'] ) ?>
88+
</a>
89+
<?php endif; ?>
8690
<?php endif; ?>
8791
</td>
8892
<?php endif; ?>

0 commit comments

Comments
 (0)