Allow username or email in login form

This commit is contained in:
Daniel Supernault 2018-03-24 22:17:05 -06:00 committed by Diogo Cordeiro
parent 3f8593268e
commit 74ad4038ac

View File

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