Define class parameters
This commit is contained in:
parent
0c08780ca2
commit
38d6f35d78
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
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.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
|
|
@ -48,6 +48,8 @@ if (!class_exists('groups')) {
|
||||||
private $toggle_field;
|
private $toggle_field;
|
||||||
private $toggle_values;
|
private $toggle_values;
|
||||||
private $location;
|
private $location;
|
||||||
|
private $user_uuid;
|
||||||
|
private $domain_uuid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* called when the object is created
|
* called when the object is created
|
||||||
|
|
@ -65,7 +67,6 @@ if (!class_exists('groups')) {
|
||||||
$this->database = new database;
|
$this->database = new database;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//set the application name and uuid
|
//set the application name and uuid
|
||||||
$this->database->app_name = $this->app_name;
|
$this->database->app_name = $this->app_name;
|
||||||
$this->database->app_uuid = $this->app_uuid;
|
$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
|
//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
|
//get the groups and save them to the groups variable
|
||||||
$this->groups = $this->assigned();
|
$this->groups = $this->assigned();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
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 $database;
|
||||||
private $domain_uuid;
|
private $domain_uuid;
|
||||||
|
private $user_uuid;
|
||||||
private $groups;
|
private $groups;
|
||||||
private $permissions;
|
private $permissions;
|
||||||
|
|
||||||
|
|
@ -49,7 +50,7 @@ if (!class_exists('permissions')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//set the domain_uuid
|
//set the domain_uuid
|
||||||
if (is_uuid($domain_uuid)) {
|
if (!empty($domain_uuid) && is_uuid($domain_uuid)) {
|
||||||
$this->domain_uuid = $domain_uuid;
|
$this->domain_uuid = $domain_uuid;
|
||||||
}
|
}
|
||||||
elseif (isset($_SESSION['domain_uuid']) && is_uuid($_SESSION['domain_uuid'])) {
|
elseif (isset($_SESSION['domain_uuid']) && is_uuid($_SESSION['domain_uuid'])) {
|
||||||
|
|
@ -57,7 +58,7 @@ if (!class_exists('permissions')) {
|
||||||
}
|
}
|
||||||
|
|
||||||
//set the user_uuid
|
//set the user_uuid
|
||||||
if (is_uuid($user_uuid)) {
|
if (!empty($user_uuid) && is_uuid($user_uuid)) {
|
||||||
$this->user_uuid = $user_uuid;
|
$this->user_uuid = $user_uuid;
|
||||||
}
|
}
|
||||||
elseif (isset($_SESSION['user_uuid']) && is_uuid($_SESSION['user_uuid'])) {
|
elseif (isset($_SESSION['user_uuid']) && is_uuid($_SESSION['user_uuid'])) {
|
||||||
|
|
@ -148,6 +149,9 @@ if (!class_exists('permissions')) {
|
||||||
* @var array $groups
|
* @var array $groups
|
||||||
*/
|
*/
|
||||||
public function assigned() {
|
public function assigned() {
|
||||||
|
//define the array
|
||||||
|
$parameter_names = [];
|
||||||
|
|
||||||
//prepare the parameters
|
//prepare the parameters
|
||||||
$x = 0;
|
$x = 0;
|
||||||
foreach ($this->groups as $field) {
|
foreach ($this->groups as $field) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue