We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2edba71 commit ad6a834Copy full SHA for ad6a834
1 file changed
lib/User.php
@@ -269,11 +269,13 @@ public static function getUserById($userId) {
269
}
270
271
public static function getUserByWebId($webId) {
272
- $idParts = explode(".", $webId, 2);
273
- if ($idParts[1] !== BASEDOMAIN . "/#me") {
+ $webIdParts = parse_url($webId);
+ $idParts = explode(".", $webIdParts['host'], 2);
274
+ if ($idParts[1] !== BASEDOMAIN) {
275
return false;
276
- $userId = preg_replace("/^id-/", "", $idParts[0]);
277
+ $userId = preg_replace("/^.*?id-/", "", $idParts[0]);
278
+
279
return self::getUserById($userId);
280
281
0 commit comments