summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmerson Kfuri <emersonkfuri@gmail.com>2019-01-16 17:41:17 -0200
committerBackportbot <backportbot-noreply@rullzer.com>2019-01-18 10:03:35 +0000
commitb96874d6a3ac3e7150ae3d0b50ad30f0173727e2 (patch)
tree6d5b8d30a929d9236def2641fc30a56e61092dff
parentb5bbbd99ce1de1dadedcc02c1e1b2a91440ad5ea (diff)
Update CacheActorsRequest.php
Signed-off-by: Emerson Kfuri <emersonkfuri@gmail.com>
-rw-r--r--lib/Db/CacheActorsRequest.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Db/CacheActorsRequest.php b/lib/Db/CacheActorsRequest.php
index 82a2f5de..7051dfb3 100644
--- a/lib/Db/CacheActorsRequest.php
+++ b/lib/Db/CacheActorsRequest.php
@@ -220,6 +220,9 @@ class CacheActorsRequest extends CacheActorsRequestBuilder {
*/
public function getFromLocalAccount(string $account): Person {
$qb = $this->getCacheActorsSelectSql();
+ if (strrpos($account, '@')) {
+ $account = substr($account, 0, strrpos($account, '@'));
+ }
$this->limitToPreferredUsername($qb, $account);
$this->limitToLocal($qb, true);
$this->leftJoinCacheDocuments($qb, 'icon_id');