Skip to content
Snippets Groups Projects
Commit 42ddeea3 authored by Jared Hancock's avatar Jared Hancock
Browse files

upgrade: Drop `<div>` from user's names

parent e6d7650c
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,15 @@ class StaffPermissions extends MigrationTask {
$staff->updatePerms($perms, $errors);
$staff->save();
}
// Update user's with <div> in their name (regression from v1.9.9)
foreach (
User::objects()->filter(array('name__startswith' => ' <div>'))
as $user
) {
$user->name = ltrim(str_replace(' <div>', '', $user->name));
$user->save();
}
}
}
return 'StaffPermissions';
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment