Skip to content

Commit 9c7468a

Browse files
committed
fix extraction of instance on result
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
1 parent 041af15 commit 9c7468a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/Search/GlobalScaleUsers.php

+6-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,12 @@ public function search($search) {
102102

103103
$result = [];
104104
foreach ($users as $user) {
105-
list(, $instance) = explode('@', $this->get('federationId', $user), 2);
105+
$cloudId = $this->get('federationId', $user);
106+
$pos = strrpos($cloudId, '@');
107+
if ($pos === false) {
108+
continue;
109+
}
110+
$instance = substr($cloudId, $pos + 1);
106111
if ($this->configService->isLocalInstance($instance)) {
107112
continue;
108113
}

0 commit comments

Comments
 (0)