fixes #2430 use configurable user_fields in sql query

Replaced hardcoded 'username' and 'id' fields in the user query with configurable fields from $conf['user_fields'] to improve flexibility and compatibility with custom user schemas.
This commit is contained in:
Linty
2025-11-02 13:48:40 +01:00
parent 443e86aec2
commit 8fb8f9f8f1

View File

@@ -113,9 +113,9 @@ SELECT
$query = '
SELECT
username
'.$conf['user_fields']['username'].' AS username
FROM '.USERS_TABLE.'
WHERE id = '.$conf['webmaster_id'].'
WHERE '.$conf['user_fields']['id'].' = '.$conf['webmaster_id'].'
;';
$owner_username = query2array($query, null, 'username');