Let the WebFingerPlugin lookup profile resources with index.php/ too
This commit is contained in:
parent
23e66bef64
commit
0c17c32267
@ -100,12 +100,21 @@ class WebFingerPlugin extends Plugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$user = User::getKV('uri', $resource);
|
try {
|
||||||
if ($user instanceof User) {
|
$user = User::getByUri($resource);
|
||||||
$profile = $user->getProfile();
|
$profile = $user->getProfile();
|
||||||
} else {
|
} catch (NoResultException $e) {
|
||||||
// try and get it by profile url
|
try {
|
||||||
$profile = Profile::getKV('profileurl', $resource);
|
// common_fake_local_fancy_url can throw an exception
|
||||||
|
$fancy_url = common_fake_local_fancy_url($resource);
|
||||||
|
|
||||||
|
// and this will throw a NoResultException if not found
|
||||||
|
$user = User::getByUri($fancy_url);
|
||||||
|
$profile = $user->getProfile();
|
||||||
|
} catch (Exception $e) {
|
||||||
|
// if our rewrite hack didn't work, try to get something by profile URL
|
||||||
|
$profile = Profile::getKV('profileurl', $resource);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user