mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 09:42:09 -04:00
Merge pull request #55006 from nextcloud/fix/displayname-migration
fix(ownCloud): ensure that `accounts.display_name` fits into `users.displayname`
This commit is contained in:
commit
1e7b45d300
1 changed files with 2 additions and 1 deletions
|
|
@ -173,7 +173,8 @@ class SaveAccountsTableData implements IRepairStep {
|
|||
}
|
||||
|
||||
if ($userdata['display_name'] !== null) {
|
||||
$update->setParameter('displayname', $userdata['display_name'])
|
||||
// user.displayname only allows 64 characters but old accounts.display_name allowed 255 characters
|
||||
$update->setParameter('displayname', mb_substr($userdata['display_name'], 0, 64))
|
||||
->setParameter('userid', $userdata['user_id']);
|
||||
$update->executeStatement();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue