From 36e1afa6ae35890a26910951dec6dda98dcdee8f Mon Sep 17 00:00:00 2001 From: Mike Macgirvin Date: Sat, 16 Oct 2010 20:38:27 -0700 Subject: allow login by username and multiple unique email addresses on system - this will provide support for group/celebrity pages (coming soon). --- include/auth.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/auth.php b/include/auth.php index 10d0df645..f4f75c607 100644 --- a/include/auth.php +++ b/include/auth.php @@ -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))) { -- cgit v1.2.3