I have data from the server: $this->getConfigData('groups') = "1,5,9,10"
I need to make a condition, if one of these id matches the id from the custom group of the current user, then continue, if not, then deny.
I tried this approach, but it doesn't work, tell me how you can implement this logic
$customerGroup = $this->_customerSession->getCustomer()->getGroupId(); -> 1
$array_key = array_keys((array)$this->getConfigData('groups')); -> {0}[1]
if(!in_array($customerGroup, $array_key)){
return false;
}