diff --git a/core/modules/user/src/UserData.php b/core/modules/user/src/UserData.php
index 3f6b593..d270c31 100644
--- a/core/modules/user/src/UserData.php
+++ b/core/modules/user/src/UserData.php
@@ -34,7 +34,7 @@ public function __construct(Connection $connection) {
   /**
    * Implements \Drupal\user\UserDataInterface::get().
    */
-  public function get($module, $uid = NULL, $name = NULL) {
+  public function get($module, $uid = NULL, $name = NULL, $value = NULL) {
     $query = $this->connection->select('users_data', 'ud')
       ->fields('ud')
       ->condition('module', $module);
@@ -44,6 +44,9 @@ public function get($module, $uid = NULL, $name = NULL) {
     if (isset($name)) {
       $query->condition('name', $name);
     }
+    if (isset($value)) {
+      $query->condition('value', $value);
+    }
     $result = $query->execute();
     // If $module, $uid, and $name was passed, return the value.
     if (isset($name) && isset($uid)) {
@@ -61,6 +64,11 @@ public function get($module, $uid = NULL, $name = NULL) {
       }
       return $return;
     }
+    // If $module, $name, and $value (and not $uid) are passed, return the uid.
+    elseif (!isset($uid) && isset($name) && isset($value)) {
+      $record = $result->fetchObject();
+      return $record->uid;
+    }
     // If $module and $name was passed, return the uid/value pairs.
     elseif (isset($name)) {
       $return = array();
diff --git a/core/modules/user/src/UserDataInterface.php b/core/modules/user/src/UserDataInterface.php
index b56baf4..96ad6ea 100644
--- a/core/modules/user/src/UserDataInterface.php
+++ b/core/modules/user/src/UserDataInterface.php
@@ -23,6 +23,8 @@
    *   (optional) The user account ID the data is associated with.
    * @param string $name
    *   (optional) The name of the data key.
+   * @param string $value
+   *   (optional) The value of the data key.
    *
    * @return mixed|array
    *   The requested user account data, depending on the arguments passed:
@@ -32,11 +34,12 @@
    *     the stored data name/value pairs.
    *   - For $module and $name, an associative array is returned whose keys are
    *     user IDs and whose values contain the stored values.
+   *   - For $module, $name, and $value, a uid, or NULL if no value was found.
    *   - For $module only, an associative array is returned that contains all
    *     existing data for $module in all user accounts, keyed first by user ID
    *     and $name second.
    */
-  public function get($module, $uid = NULL, $name = NULL);
+  public function get($module, $uid = NULL, $name = NULL, $value = NULL);

   /**
    * Stores data for a user account.
