mirror of
https://github.com/friendica/friendica
synced 2025-04-25 19:10:11 +00:00
Update user import/export with profile fields
- Account for backward compatibility when exporting: add values for profile.is-default and profile.profile-name fields - Account for forward compatibility when importing: migrate legacy profiles to custom profile fields
This commit is contained in:
parent
18cfd8dfaa
commit
e8bf74914b
2 changed files with 52 additions and 18 deletions
|
@ -167,7 +167,11 @@ class UserExport extends BaseSettingsModule
|
|||
|
||||
|
||||
$profile = self::exportMultiRow(
|
||||
sprintf("SELECT * FROM `profile` WHERE `uid` = %d ", intval(local_user()))
|
||||
sprintf("SELECT *, 'default' AS `profile_name`, 1 AS `is-default` FROM `profile` WHERE `uid` = %d ", intval(local_user()))
|
||||
);
|
||||
|
||||
$profile_fields = self::exportMultiRow(
|
||||
sprintf("SELECT * FROM `profile_field` WHERE `uid` = %d ", intval(local_user()))
|
||||
);
|
||||
|
||||
$photo = self::exportMultiRow(
|
||||
|
@ -196,6 +200,7 @@ class UserExport extends BaseSettingsModule
|
|||
'user' => $user,
|
||||
'contact' => $contact,
|
||||
'profile' => $profile,
|
||||
'profile_fields' => $profile_fields,
|
||||
'photo' => $photo,
|
||||
'pconfig' => $pconfig,
|
||||
'group' => $group,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue