Browse Source

Merge pull request #1818 from pixelfed/staging

Update FixUsernames command
daniel 5 years ago
parent
commit
9452f2796a
2 changed files with 2 additions and 1 deletions
  1. 1 0
      CHANGELOG.md
  2. 1 1
      app/Console/Commands/FixUsernames.php

+ 1 - 0
CHANGELOG.md

@@ -44,6 +44,7 @@
 - Updated FollowerController to fix bug affecting private profiles ([a429d961](https://github.com/pixelfed/pixelfed/commit/a429d961))
 - Updated FollowerController to fix bug affecting private profiles ([a429d961](https://github.com/pixelfed/pixelfed/commit/a429d961))
 - Updated StatusTransformer, added ```local``` attribute ([484bb509](https://github.com/pixelfed/pixelfed/commit/484bb509))
 - Updated StatusTransformer, added ```local``` attribute ([484bb509](https://github.com/pixelfed/pixelfed/commit/484bb509))
 - Updated PostComponent, fix bug affecting MomentUI and non authenticated users ([7b3fe215](https://github.com/pixelfed/pixelfed/commit/7b3fe215))
 - Updated PostComponent, fix bug affecting MomentUI and non authenticated users ([7b3fe215](https://github.com/pixelfed/pixelfed/commit/7b3fe215))
+- Updated FixUsernames command to allow usernames containing ```.``` ([e5d77c6d](https://github.com/pixelfed/pixelfed/commit/e5d77c6d))
 
 
 ## Deprecated
 ## Deprecated
     
     

+ 1 - 1
app/Console/Commands/FixUsernames.php

@@ -51,7 +51,7 @@ class FixUsernames extends Command
                 if(in_array($user->username, $restricted)) {
                 if(in_array($user->username, $restricted)) {
                     $affected->push($user);
                     $affected->push($user);
                 }
                 }
-                $val = str_replace(['-', '_'], '', $user->username);
+                $val = str_replace(['-', '_', '.'], '', $user->username);
                 if(!ctype_alnum($val)) {
                 if(!ctype_alnum($val)) {
                     $this->info('Found invalid username: ' . $user->username);
                     $this->info('Found invalid username: ' . $user->username);
                     $affected->push($user);
                     $affected->push($user);