From 923e044621756998fc34ff1a8b937e2bba1734db Mon Sep 17 00:00:00 2001 From: markjcrane Date: Tue, 4 Nov 2025 18:11:23 -0700 Subject: [PATCH] Update the SQL query to add the alias - Remove the redirect --- core/users/user_profile.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/core/users/user_profile.php b/core/users/user_profile.php index bf59a9f195..e00e8e78c7 100644 --- a/core/users/user_profile.php +++ b/core/users/user_profile.php @@ -524,7 +524,7 @@ $sql .= "left join v_contact_attachments as ca2 on u.contact_uuid = ca2.contact_uuid and ca2.attachment_primary = true "; $sql .= "where u.user_uuid = :user_uuid "; if (!permission_exists('user_all')) { - $sql .= "and domain_uuid = :domain_uuid "; + $sql .= "and u.domain_uuid = :domain_uuid "; $parameters['domain_uuid'] = $domain_uuid; } $parameters['user_uuid'] = $user_uuid; @@ -553,11 +553,6 @@ $attachment_filename = $row["attachment_filename"]; $attachment_content = $row["attachment_content"]; } - else { - message::add($text['message-invalid_user'], 'negative', 7500); - header("Location: user_edit.php?id=".$_SESSION['user_uuid']); - exit; - } unset($sql, $parameters, $row); //get all language codes from database