allow login by username and multiple unique email addresses on system - this will provide support for group/celebrity pages (coming soon).

This commit is contained in:
Mike Macgirvin 2010-10-16 20:38:27 -07:00
parent 6d646e9df5
commit 36e1afa6ae
5 changed files with 11 additions and 26 deletions

View file

@ -66,7 +66,8 @@ else {
// process login request
$r = q("SELECT * FROM `user`
WHERE `email` = '%s' AND `password` = '%s' AND `blocked` = 0 AND `verified` = 1 LIMIT 1",
WHERE ( `email` = '%s' OR `nickname` = '%s' ) AND `password` = '%s' AND `blocked` = 0 AND `verified` = 1 LIMIT 1",
dbesc(trim($_POST['login-name'])),
dbesc(trim($_POST['login-name'])),
dbesc($encrypted));
if(($r === false) || (! count($r))) {