mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
fix(ownCloud): ensure that accounts.display_name fits into users.displayname
- manual backport of https://github.com/nextcloud/server/pull/55006 Needed because we recommend to do migrations from OC 10.x to NC 25 ... Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
b1e8c7658c
commit
78d74d1ea1
1 changed files with 2 additions and 1 deletions
|
|
@ -191,7 +191,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->execute();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue