mirror of
https://github.com/getnamingo/registry.git
synced 2025-08-04 00:31:50 +02:00
Many changes on user profile and login system
- Fixed #80 - Better UI - Fixed some bugs
This commit is contained in:
parent
5831b2d7db
commit
e032e7575b
10 changed files with 230 additions and 170 deletions
|
@ -248,13 +248,14 @@ $app->any('/api[/{params:.*}]', function (
|
|||
'registrar' => 'id',
|
||||
'payment_history' => 'registrar_id',
|
||||
'statement' => 'registrar_id',
|
||||
'support_tickets' => 'user_id', // Note: this still uses user_id
|
||||
'support_tickets' => 'user_id', // Continues to use user_id
|
||||
'users_audit' => 'user_id', // Continues to use user_id
|
||||
];
|
||||
|
||||
if (array_key_exists($tableName, $columnMap)) {
|
||||
// Use registrarId for tables where 'registrar_id' is the filter
|
||||
// For 'support_tickets', continue to use userId
|
||||
return [$columnMap[$tableName] => ($tableName === 'support_tickets' ? $_SESSION['auth_user_id'] : $registrarId)];
|
||||
// For 'support_tickets' and 'users_audit', use userId
|
||||
return [$columnMap[$tableName] => (in_array($tableName, ['support_tickets', 'users_audit']) ? $_SESSION['auth_user_id'] : $registrarId)];
|
||||
}
|
||||
|
||||
return ['1' => '0'];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue