fix the user_uuid missing from transaction tables (#7026)

Co-authored-by: Tim Fry <tim@fusionpbx.com>
This commit is contained in:
frytimo 2024-06-27 14:26:16 -03:00 committed by GitHub
parent 23093f6a14
commit a863faaae2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 0 deletions

View File

@ -316,6 +316,14 @@
if (isset($params['domain_uuid'])) { if (isset($params['domain_uuid'])) {
$this->domain_uuid = $params['domain_uuid']; $this->domain_uuid = $params['domain_uuid'];
} }
//allow passed user_uuid in the constructor to override the session user_uuid
if (isset($params['user_uuid'])) {
$this->user_uuid = $params['user_uuid'];
} else {
//try to determine the current user_uuid using the session
$this->user_uuid = (!empty($_SESSION['user_uuid']) ? $_SESSION['user_uuid'] : null);
}
} }
/** /**