aboutsummaryrefslogtreecommitdiffstats
path: root/include/auth.php
diff options
context:
space:
mode:
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))) {