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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user