Would it be possible to have a new type of operator
-
Would it be possible to have a new type of operator something like
in_reverse
andin_i_reverse
that would just reverse the order of variables when applying the logic?I was looking at how the logic is applied for the UserData and I am not able to match correctly the users with the
in
andin_i
operators. I am not saying there is an error, this works perfectly for everything else. My use-case is a bit different, and I would need your help with this if it’s possible.It goes like this:
– Let’s say I haveUserData.custom_attribute
that contains something like thisval1,val2,val3
.
– I would need then to configure the custom rule to be true for any user with custom_attribute containingval1
.
– So, in this case, I would need that the applied logic to use the parameters in the other order (I am referring to this part ('in_i' => function($a, $b){
which only looks fora
to be contained insideb
and not the other way around).Basically, what I am asking is can we have a new operator type that is doing “variable contains the value” instead of “variable can be found in the value”?
{"in_i": [ {"var":"UserData.custom_attribute"}, "some_value" ] } {"in_i_reverse": [ "some_value", {"var":"UserData.custom_attribute"} ] }
Thank you very much!
Iulia
- The topic ‘Would it be possible to have a new type of operator’ is closed to new replies.