summaryrefslogtreecommitdiff
path: root/includes/pages/user_messages.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/pages/user_messages.php')
-rw-r--r--includes/pages/user_messages.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/includes/pages/user_messages.php b/includes/pages/user_messages.php
index 72bb9ae2..5ec6fdfb 100644
--- a/includes/pages/user_messages.php
+++ b/includes/pages/user_messages.php
@@ -41,16 +41,18 @@ function user_messages()
if (!$request->has('action')) {
/** @var User[] $users */
$users = User::query()
- ->whereKeyNot($user->id)
+ ->where('user_id', '!=', $user->id)
+ ->leftJoin('users_personal_data', 'users.id', '=', 'users_personal_data.user_id')
->orderBy('name')
- ->get(['id', 'name']);
+ ->get(['id', 'name', 'pronoun']);
$to_select_data = [
'' => __('Select recipient...')
];
foreach ($users as $u) {
- $to_select_data[$u->id] = $u->name;
+ $pronoun = ((config('enable_pronoun') && $u->pronoun) ? ' (' . htmlspecialchars($u->pronoun) . ')' : '');
+ $to_select_data[$u->id] = $u->name . $pronoun;
}
$to_select = html_select_key('to', 'to', $to_select_data, '');