mirror of
https://github.com/friendica/friendica
synced 2024-11-19 12:23:40 +00:00
Exit with an error if profile info isn't available in Module\NoScrape
This commit is contained in:
parent
2e0151bec0
commit
1304e14572
1 changed files with 5 additions and 2 deletions
|
@ -46,14 +46,17 @@ class NoScrape extends BaseModule
|
|||
$which = $parameters['nick'];
|
||||
} elseif (local_user() && isset($parameters['profile']) && DI::args()->get(2) == 'view') {
|
||||
// view infos about a known profile (needs a login)
|
||||
$which = $a->user['nickname'];
|
||||
$which = $a->user['nickname'];
|
||||
} else {
|
||||
System::jsonError(403, 'Authentication required');
|
||||
exit();
|
||||
}
|
||||
|
||||
Profile::load($a, $which);
|
||||
|
||||
if (empty($a->profile['uid'])) {
|
||||
System::jsonError(404, 'Profile not found');
|
||||
}
|
||||
|
||||
$json_info = [
|
||||
'addr' => $a->profile['addr'],
|
||||
'nick' => $which,
|
||||
|
|
Loading…
Reference in a new issue