Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm using Rules to handle my site membership system. When someone signs up to the site, I'm storing their order number from our external payment merchant, but appending some other data to the end of the string.
I need to identify whether a customer already exists when a transaction is made and one of the ways I need to do this is by checking if their order number already exists.
I would need an action where I could fetch the user (entity) by property, whereby the specified field CONTAINS the order number.
How do I do this?
Comments
Comment #2
TR CreditAttribution: TR commentedThe Entity API only allows you to query by the exact contents of the property. If you want to use a more complex query you will have to write a custom action. You can also probably do this with Views Bulk Operations to make the query - VBO has an action that exposes the query results to Rules.