mirror of
https://github.com/friendica/friendica
synced 2025-04-26 22:30:18 +00:00
We now fetch data with an automatically generated system user
This commit is contained in:
parent
2475058cc4
commit
7dbf72e454
9 changed files with 244 additions and 72 deletions
|
@ -90,20 +90,6 @@ class ActivityPub
|
|||
*/
|
||||
public static function fetchContent(string $url, int $uid = 0)
|
||||
{
|
||||
if (empty($uid)) {
|
||||
$user = User::getFirstAdmin(['uid']);
|
||||
|
||||
if (empty($user['uid'])) {
|
||||
// When the system setup is missing an admin we just take the first user
|
||||
$condition = ['verified' => true, 'blocked' => false, 'account_removed' => false, 'account_expired' => false];
|
||||
$user = DBA::selectFirst('user', ['uid'], $condition);
|
||||
}
|
||||
|
||||
if (!empty($user['uid'])) {
|
||||
$uid = $user['uid'];
|
||||
}
|
||||
}
|
||||
|
||||
return HTTPSignature::fetch($url, $uid);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue