Abort early if owner isn't found in mod/photos

- Address https://github.com/friendica/friendica/issues/10473#issuecomment-894779649
This commit is contained in:
Hypolite Petovan 2021-08-17 09:06:28 -04:00
parent 64d6df659d
commit 891c0ff130

View file

@ -65,6 +65,9 @@ function photos_init(App $a) {
if (DI::args()->getArgc() > 1) {
$owner = User::getOwnerDataByNick(DI::args()->getArgv()[1]);
if (!$owner) {
throw new HTTPException\NotFoundException(DI::l10n()->t('User not found.'));
}
$is_owner = (local_user() && (local_user() == $owner['uid']));