Commit 50e49959 authored by Richard Mansfield's avatar Richard Mansfield Committed by Nigel McNie
Browse files

Don't display suspend user link when user is already suspended

parent 9647b496
......@@ -285,7 +285,7 @@ class PluginSearchInternal extends PluginSearch {
$data = get_records_sql_array('
SELECT
u.id, u.firstname, u.lastname, u.username, u.institution, u.email, u.staff,
u.active, u.suspendedctime
u.active, NOT u.suspendedcusr IS NULL as suspended
FROM
{usr} u ' . $where . '
ORDER BY ' . $sort,
......
......@@ -446,6 +446,7 @@ END;
'text_firstname' => $user['firstname'],
'text_lastname' => $user['lastname'],
'index_active' => $user['active'],
'store_suspended' => (int)!empty($user['suspendedcusr']),
);
if (empty($doc['index_name'])) {
$doc['index_name'] = $user['firstname'] . ' ' . $user['lastname'];
......
<a class="suspend-user-link" href="{$WWWROOT}admin/users/suspend.php?id={$r.id}">{str tag=suspenduser section=admin}</a>
\ No newline at end of file
{if !$r.suspended || $r.suspended == 'f'}
<a class="suspend-user-link" href="{$WWWROOT}admin/users/suspend.php?id={$r.id}">{str tag=suspenduser section=admin}</a>
{/if}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment