diff options
author | Mike Macgirvin <mike@macgirvin.com> | 2010-10-16 20:38:27 -0700 |
---|---|---|
committer | Mike Macgirvin <mike@macgirvin.com> | 2010-10-16 20:38:27 -0700 |
commit | 36e1afa6ae35890a26910951dec6dda98dcdee8f (patch) | |
tree | 392f4f5536c7558c7754cdaaf384d1fb2a12e175 /include | |
parent | 6d646e9df5ccd5c0b5a70f15e242b0c50a0b877b (diff) | |
download | volse-hubzilla-36e1afa6ae35890a26910951dec6dda98dcdee8f.tar.gz volse-hubzilla-36e1afa6ae35890a26910951dec6dda98dcdee8f.tar.bz2 volse-hubzilla-36e1afa6ae35890a26910951dec6dda98dcdee8f.zip |
allow login by username and multiple unique email addresses on system - this will provide support for group/celebrity pages (coming soon).
Diffstat (limited to 'include')
-rw-r--r-- | include/auth.php | 3 |
1 files changed, 2 insertions, 1 deletions
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))) { |