public function hasProperty($userId, $propertyName, $value = null)
    {
        //anydataset.Row
        $user = $this->getById($userId);

        if (empty($user)) {
            return false;
        }

        if ($this->isAdmin($userId)) {
            return true;
        }

        $values = $user->get($propertyName);
        return ($values !== null ? in_array($value, (array)$values) : false);
    }
public function hasProperty($userId, $propertyName, $value = null)
    {
        //anydataset.Row
        $user = $this->getById($userId);

        if (empty($user)) {
            return false;
        }

        if ($this->isAdmin($userId)) {
            return true;
        }

        $values = $user->get($propertyName);
        return ($values !== null ? in_array($value, (array)$values) : false);
    }
public function hasProperty ( $ userId , $ propertyName , $ value = null ) { //anydataset.Row $ user = $ this -> getById ( $ userId ) ; if ( empty ( $ user ) ) { return false ; } if ( $ this -> isAdmin ( $ userId ) ) { return true ; } $ values = $ user -> get ( $ propertyName ) ; return ( $ values !== null ? in_array ( $ value , ( array ) $ values ) : false ) ; }
Check if the user have a property and it have a specific value.
Return True if have rights; false, otherwise

@param mixed $userId User identification
@param string $propertyName
@param string $value Property value
@return bool
@throws \ByJG\Authenticate\Exception\UserNotFoundException
@throws \ByJG\Serializer\Exception\InvalidArgumentException
Check if the user have a property and it have a specific value . Return True if have rights ; false otherwise