]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Allow username or email in login form
authorDaniel Supernault <danielsupernault@gmail.com>
Sun, 25 Mar 2018 04:17:05 +0000 (22:17 -0600)
committerDiogo Cordeiro <diogo@fc.up.pt>
Wed, 12 Jun 2019 02:25:06 +0000 (03:25 +0100)
lib/nickname.php

index e21517497a18cd0587530bc14519fb9ebf310ff5..cdceaef726a5f4bfbbb7cfaa0225afede46f359d 100644 (file)
@@ -141,7 +141,7 @@ class Nickname
 
         if (mb_strlen($str) < 1) {
             throw new NicknameEmptyException();
-        } elseif (!self::isCanonical($str)) {
+        } elseif (!self::isCanonical($str) && !filter_var($str, FILTER_VALIDATE_EMAIL)) {
             throw new NicknameInvalidException();
         } elseif (self::isBlacklisted($str)) {
             throw new NicknameBlacklistedException();