Skip to content
Snippets Groups Projects
Commit ef5866f9 authored by Robert Anderson's avatar Robert Anderson
Browse files

Cannot add wisp user attributes without at least three values (name, operator, value)

parent 3906bf52
No related branches found
No related tags found
No related merge requests found
...@@ -363,7 +363,11 @@ function createWiSPUser($params) { ...@@ -363,7 +363,11 @@ function createWiSPUser($params) {
foreach ($params[0]['Attributes'] as $attr) { foreach ($params[0]['Attributes'] as $attr) {
# We only want to add attributes with all values # We only want to add attributes with all values
if (isset($attr['Name']) && isset($attr['Operator']) && isset($attr['Value'])) { $boolName = (isset($attr['Name']) && $attr['Name'] != "");
$boolOperator = (isset($attr['Operator']) && $attr['Operator'] != "");
$boolValue = (isset($attr['Value']) && $attr['Value'] != "");
if (($boolName && $boolOperator && $boolValue) == TRUE) {
# Default value without modifier # Default value without modifier
$attrValue = $attr['Value']; $attrValue = $attr['Value'];
...@@ -498,7 +502,11 @@ function createWiSPUser($params) { ...@@ -498,7 +502,11 @@ function createWiSPUser($params) {
if ($res !== FALSE && count($params[0]['Attributes']) > 0) { if ($res !== FALSE && count($params[0]['Attributes']) > 0) {
foreach ($params[0]['Attributes'] as $attr) { foreach ($params[0]['Attributes'] as $attr) {
if (isset($attr['Name']) && isset($attr['Operator']) && isset($attr['Value'])) { # We only want to add attributes with all values
$boolName = (isset($attr['Name']) && $attr['Name'] != "");
$boolOperator = (isset($attr['Operator']) && $attr['Operator'] != "");
$boolValue = (isset($attr['Value']) && $attr['Value'] != "");
if (($boolName && $boolOperator && $boolValue) == TRUE) {
# Default value without modifier # Default value without modifier
$attrValue = $attr['Value']; $attrValue = $attr['Value'];
...@@ -707,7 +715,11 @@ function updateWiSPUser($params) { ...@@ -707,7 +715,11 @@ function updateWiSPUser($params) {
if ($res !== FALSE && count($params[0]['Attributes']) > 0) { if ($res !== FALSE && count($params[0]['Attributes']) > 0) {
foreach ($params[0]['Attributes'] as $attr) { foreach ($params[0]['Attributes'] as $attr) {
if (isset($attr['ID']) && isset($attr['Name']) && isset($attr['Operator']) && isset($attr['Value'])) { # We only want to add attributes with all values
$boolName = (isset($attr['Name']) && $attr['Name'] != "");
$boolOperator = (isset($attr['Operator']) && $attr['Operator'] != "");
$boolValue = (isset($attr['Value']) && $attr['Value'] != "");
if (($boolName && $boolOperator && $boolValue) == TRUE) {
# Default value without modifier # Default value without modifier
$attrValue = $attr['Value']; $attrValue = $attr['Value'];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment