fix profiles export without account type provided, because throws access warning on import

This commit is contained in:
ghost 2023-09-16 04:39:42 +03:00
parent d38b8fb851
commit a2ee4e845c

View File

@ -199,7 +199,7 @@ try
foreach ($db->getUsers() as $user)
{
// Dump public data only
if ($user->public === '1')
if ($user->public)
{
$users[] = (object)
[
@ -236,7 +236,10 @@ try
foreach ($db->getMagnets($user->userId) as $magnet)
{
// Dump public data only
if ($magnet->public === '1')
if ($magnet->public &&
$public['user'][$magnet->userId]) // After upgrade, some users have not updated their public status.
// Remote node have warning on import, because user info still hidden to init new profile there.
// Stop magnets export without public profile available, even magnet is public.
{
// Info Hash
$xt = [];