mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-14 01:24:06 -08:00
Fixed #4821 - add username to user selection dropdown
This commit is contained in:
parent
5dcc63dc74
commit
532b299c40
|
@ -132,6 +132,7 @@ class UsersController extends Controller
|
||||||
$users = User::select(
|
$users = User::select(
|
||||||
[
|
[
|
||||||
'users.id',
|
'users.id',
|
||||||
|
'users.username',
|
||||||
'users.employee_num',
|
'users.employee_num',
|
||||||
'users.first_name',
|
'users.first_name',
|
||||||
'users.last_name',
|
'users.last_name',
|
||||||
|
@ -160,8 +161,12 @@ class UsersController extends Controller
|
||||||
}
|
}
|
||||||
$name_str .= e($user->first_name);
|
$name_str .= e($user->first_name);
|
||||||
|
|
||||||
|
if ($user->username!='') {
|
||||||
|
$name_str .= ' ('.e($user->username).')';
|
||||||
|
}
|
||||||
|
|
||||||
if ($user->employee_num!='') {
|
if ($user->employee_num!='') {
|
||||||
$name_str .= ' (#'.e($user->employee_num).')';
|
$name_str .= ' - #'.e($user->employee_num);
|
||||||
}
|
}
|
||||||
|
|
||||||
$user->use_text = $name_str;
|
$user->use_text = $name_str;
|
||||||
|
|
Loading…
Reference in a new issue