Skip to content
Snippets Groups Projects
Commit c56b3c98 authored by David Siegfried's avatar David Siegfried
Browse files

show more infos in multipersonsearch, closes #2864

Closes #2864

Merge request studip/studip!1949
parent f813f435
No related branches found
No related tags found
No related merge requests found
...@@ -42,10 +42,23 @@ class MultipersonsearchController extends AuthenticatedController ...@@ -42,10 +42,23 @@ class MultipersonsearchController extends AuthenticatedController
$output = []; $output = [];
foreach ($result as $user) { foreach ($result as $user) {
if ($GLOBALS['perm']->have_perm('dozent')) {
$lock_string = (int)$user->locked === 1 ? sprintf(' [%s]', _('gesperrt')) : '';
} else {
$lock_string = '';
}
$text = sprintf(
'%s, %s%s -- %s (%s)',
$user->nachname,
$user->vorname,
$lock_string,
$user->perms,
$user->username
);
$output[] = [ $output[] = [
'user_id' => $user->id, 'user_id' => $user->id,
'avatar' => Avatar::getAvatar($user->id)->getURL(Avatar::SMALL), 'avatar' => Avatar::getAvatar($user->id)->getURL(Avatar::SMALL),
'text' => "{$user->nachname}, {$user->vorname} -- {$user->perms} ({$user->username})", 'text' => $text,
'member' => in_array($user->id, $alreadyMember), 'member' => in_array($user->id, $alreadyMember),
]; ];
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment