Adjustments regarding accounts.id in admin panel -> Accounts editor

getAccountIdentityColumn() function
This commit is contained in:
slawkens
2024-12-19 22:32:05 +01:00
parent 023f1dc598
commit 8e0978c1ed
2 changed files with 16 additions and 7 deletions

View File

@@ -1684,6 +1684,18 @@ function isRequestMethod(string $method): bool {
return strtolower($_SERVER['REQUEST_METHOD']) == strtolower($method);
}
function getAccountIdentityColumn(): string
{
if (USE_ACCOUNT_NAME) {
return 'name';
}
elseif (USE_ACCOUNT_NUMBER) {
return 'number';
}
return 'id';
}
// validator functions
require_once SYSTEM . 'compat/base.php';