Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-13481

Getting a contact by email via the API results in a LIKE query

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 4.3.6
    • Fix Version/s: 4.5
    • Component/s: CiviCRM API
    • Labels:
      None

      Description

      Using the CiviCRM API v3, if I try to get a contact by their email address, the email is passed through a LIKE query. For example, putting this query into the API explorer gives back lots of results with GMail addresses:

      /civicrm/ajax/rest?entity=Contact&action=get&debug=1&sequential=1&json=1&email=gmail.com

      Fetching an Email entity only gives exact matches, for example:

      /civicrm/ajax/rest?entity=Email&action=get&debug=1&sequential=1&json=1&email=gmail.com

      Is this the intended behavior? If it is, it isn't documented anywhere, and I didn't expect it.

        Attachments

          Activity

            People

            • Assignee:
              eileen Eileen McNaughton
              Reporter:
              drifteaur Zoltan Varady
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: