43fd0d88 by Jonille Arreglo

11515_encrypted_flag

1 parent ff07060e
......@@ -165,6 +165,13 @@ class FlagManager {
if(!$flag['is_filtered']) return $needle;
$acceptedValues = $flag['accepted_values'];
if(isset($flag['both_usable'])){
if($flag['both_usable']){
return count(array_filter($acceptedValues, function($value) use ($needle) {
return $value['encrypted_value'] == $needle || $value['value'] == $needle;
})) ? $needle : $defaultValue;
}
}
return count(array_filter($acceptedValues, function($value) use ($needle) {
return $value['encrypted_value'] == $needle;
})) ? $needle : $defaultValue;
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!