LogoKolab Groupware OBS > Projects
Log In

View File 0013-No-matching-commits-to-users-on-displayname.patch of Package phabricator (Project Infrastructure)

From 40759b4d5f33fc4d8737ec41845a3d54ced18f6b Mon Sep 17 00:00:00 2001
From: "Jeroen van Meeuwen (Kolab Systems)" <vanmeeuwen@kolabsys.com>
Date: Wed, 10 Aug 2016 18:27:51 +0200
Subject: [PATCH 13/15] No matching commits to users on displayname

Phabricator erroneously assumes that it operates in a vacuum, while in the real world, multiple people may carry a display name of Jack.

Do not too eagerly match one thing with a completely different thing on the premises that one thing sorta looks similar to another thing.
---
 .../diffusion/query/DiffusionResolveUserQuery.php     | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/src/applications/diffusion/query/DiffusionResolveUserQuery.php b/src/applications/diffusion/query/DiffusionResolveUserQuery.php
index a22408c..fa67145 100644
--- a/src/applications/diffusion/query/DiffusionResolveUserQuery.php
+++ b/src/applications/diffusion/query/DiffusionResolveUserQuery.php
@@ -44,13 +44,7 @@ final class DiffusionResolveUserQuery extends Phobject {
       return $phid;
     }
 
-    $phid = $this->findUserByRealName($user_name);
-    if ($phid) {
-      return $phid;
-    }
-
     // No hits yet, try to parse it as an email address.
-
     $email = new PhutilEmailAddress($user_name);
 
     $phid = $this->findUserByEmailAddress($email->getAddress());
@@ -58,19 +52,6 @@ final class DiffusionResolveUserQuery extends Phobject {
       return $phid;
     }
 
-    $display_name = $email->getDisplayName();
-    if ($display_name) {
-      $phid = $this->findUserByUserName($display_name);
-      if ($phid) {
-        return $phid;
-      }
-
-      $phid = $this->findUserByRealName($display_name);
-      if ($phid) {
-        return $phid;
-      }
-    }
-
     return null;
   }
 
-- 
2.9.3