From: Daniel Supernault Date: Sun, 25 Mar 2018 04:17:05 +0000 (-0600) Subject: Allow username or email in login form X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=74ad4038ac33f5116743e000099670cdf0f7b14f;p=quix0rs-gnu-social.git Allow username or email in login form --- diff --git a/lib/nickname.php b/lib/nickname.php index e21517497a..cdceaef726 100644 --- a/lib/nickname.php +++ b/lib/nickname.php @@ -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();