]> git.mxchange.org Git - friendica.git/commitdiff
Don't update user.username from an empty profile.name in 1525 update
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 20 Aug 2023 19:12:02 +0000 (15:12 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sun, 20 Aug 2023 19:12:02 +0000 (15:12 -0400)
update.php

index 78295921a14faf9461494342a7bd84488cb1f2a8..59340eed83c84dfe7281048e7145d5f61964b2a8 100644 (file)
@@ -1356,7 +1356,8 @@ function update_1525(): int
        if (!DBA::e('UPDATE `user` u
     JOIN `profile` p
     ON p.`uid` = u.`uid`
-    SET u.`username` = p.`name`')) {
+    SET u.`username` = p.`name`
+    WHERE p.`name` != ""')) {
                return Update::FAILED;
        }