mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2025-12-30 00:53:50 +00:00
Define class parameters
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Portions created by the Initial Developer are Copyright (C) 2016-2023
|
||||
Portions created by the Initial Developer are Copyright (C) 2016-2024
|
||||
the Initial Developer. All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
@@ -48,6 +48,8 @@ if (!class_exists('groups')) {
|
||||
private $toggle_field;
|
||||
private $toggle_values;
|
||||
private $location;
|
||||
private $user_uuid;
|
||||
private $domain_uuid;
|
||||
|
||||
/**
|
||||
* called when the object is created
|
||||
@@ -65,7 +67,6 @@ if (!class_exists('groups')) {
|
||||
$this->database = new database;
|
||||
}
|
||||
|
||||
|
||||
//set the application name and uuid
|
||||
$this->database->app_name = $this->app_name;
|
||||
$this->database->app_uuid = $this->app_uuid;
|
||||
@@ -81,7 +82,7 @@ if (!class_exists('groups')) {
|
||||
}
|
||||
|
||||
//get the list of groups the user is a member of
|
||||
if (is_uuid($domain_uuid) && is_uuid($user_uuid)) {
|
||||
if (!empty($domain_uuid) && !empty($user_uuid)) {
|
||||
//get the groups and save them to the groups variable
|
||||
$this->groups = $this->assigned();
|
||||
|
||||
@@ -535,4 +536,4 @@ if (!class_exists('groups')) {
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Copyright (C) 2016 - 2023 All Rights Reserved.
|
||||
Copyright (C) 2016 - 2024 All Rights Reserved.
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -32,6 +32,7 @@ if (!class_exists('permissions')) {
|
||||
|
||||
private $database;
|
||||
private $domain_uuid;
|
||||
private $user_uuid;
|
||||
private $groups;
|
||||
private $permissions;
|
||||
|
||||
@@ -49,7 +50,7 @@ if (!class_exists('permissions')) {
|
||||
}
|
||||
|
||||
//set the domain_uuid
|
||||
if (is_uuid($domain_uuid)) {
|
||||
if (!empty($domain_uuid) && is_uuid($domain_uuid)) {
|
||||
$this->domain_uuid = $domain_uuid;
|
||||
}
|
||||
elseif (isset($_SESSION['domain_uuid']) && is_uuid($_SESSION['domain_uuid'])) {
|
||||
@@ -57,7 +58,7 @@ if (!class_exists('permissions')) {
|
||||
}
|
||||
|
||||
//set the user_uuid
|
||||
if (is_uuid($user_uuid)) {
|
||||
if (!empty($user_uuid) && is_uuid($user_uuid)) {
|
||||
$this->user_uuid = $user_uuid;
|
||||
}
|
||||
elseif (isset($_SESSION['user_uuid']) && is_uuid($_SESSION['user_uuid'])) {
|
||||
@@ -148,6 +149,9 @@ if (!class_exists('permissions')) {
|
||||
* @var array $groups
|
||||
*/
|
||||
public function assigned() {
|
||||
//define the array
|
||||
$parameter_names = [];
|
||||
|
||||
//prepare the parameters
|
||||
$x = 0;
|
||||
foreach ($this->groups as $field) {
|
||||
@@ -197,4 +201,4 @@ if (!class_exists('permissions')) {
|
||||
$p->delete($permission);
|
||||
*/
|
||||
|
||||
?>
|
||||
?>
|
||||
Reference in New Issue
Block a user