Commit 3390d7f1 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Only show edit link in search for users from the admin's institutions

parent 6e6a5e26
......@@ -202,6 +202,7 @@ function build_admin_user_search_results($search, $offset, $limit, $sortby, $sor
$smarty = smarty_core();
$smarty->assign_by_ref('results', $results);
$smarty->assign_by_ref('institutions', $institutions);
$smarty->assign('USER', $USER);
$smarty->assign('searchurl', $searchurl);
$smarty->assign('sortby', $sortby);
$smarty->assign('sortdir', $sortdir);
......
<a href="{$WWWROOT}admin/users/edit.php?id={$r.id}">{$r.username}</a>
\ No newline at end of file
{if $USER->get('admin') || !empty($r.institutions)}
<a href="{$WWWROOT}admin/users/edit.php?id={$r.id}">{$r.username}</a>
{else}
{$r.username}
{/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