mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
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:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user