Merge pull request #6131 from annando/diaspora-relocation

Create a new GUID on user import
This commit is contained in:
Tobias Diekershoff 2018-11-14 10:27:25 +01:00 committed by GitHub
commit 89cc79b77b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,7 @@ namespace Friendica\Core;
use Friendica\App; use Friendica\App;
use Friendica\Core\Logger; use Friendica\Core\Logger;
use Friendica\Core\Protocol; use Friendica\Core\Protocol;
use Friendica\Core\System;
use Friendica\Database\DBA; use Friendica\Database\DBA;
use Friendica\Model\Photo; use Friendica\Model\Photo;
use Friendica\Object\Image; use Friendica\Object\Image;
@ -129,6 +130,9 @@ class UserImport
$old_handle = $account['user']['nickname'].$oldaddr; $old_handle = $account['user']['nickname'].$oldaddr;
} }
// Creating a new guid to avoid problems with Diaspora
$account['user']['guid'] = System::createUUID();
$olduid = $account['user']['uid']; $olduid = $account['user']['uid'];
unset($account['user']['uid']); unset($account['user']['uid']);