aboutsummaryrefslogtreecommitdiffstats
path: root/include/auth.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-10-16 20:38:27 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-10-16 20:38:27 -0700
commit36e1afa6ae35890a26910951dec6dda98dcdee8f (patch)
tree392f4f5536c7558c7754cdaaf384d1fb2a12e175 /include/auth.php
parent6d646e9df5ccd5c0b5a70f15e242b0c50a0b877b (diff)
downloadvolse-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/auth.php')
-rw-r--r--include/auth.php3
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))) {