]> git.mxchange.org Git - friendica.git/blobdiff - include/auth.php
account expiration structures
[friendica.git] / include / auth.php
index b7b96bdc0bb7f3f047c2ede73dd29a8eeb3a075e..1f16b350479a9074da639249f35cb336eee229bc 100644 (file)
@@ -49,7 +49,7 @@ if((isset($_SESSION)) && (x($_SESSION,'authenticated')) && ((! (x($_POST,'auth-p
                }
 
                $r = q("SELECT `user`.*, `user`.`pubkey` as `upubkey`, `user`.`prvkey` as `uprvkey` 
-               FROM `user` WHERE `uid` = %d LIMIT 1",
+               FROM `user` WHERE `uid` = %d AND `blocked` = 0 AND `account_expired` = 0 AND `verified` = 1 LIMIT 1",
                        intval($_SESSION['uid'])
                );
 
@@ -186,7 +186,7 @@ else {
 
                        $r = q("SELECT `user`.*, `user`.`pubkey` as `upubkey`, `user`.`prvkey` as `uprvkey`  
                                FROM `user` WHERE ( `email` = '%s' OR `nickname` = '%s' ) 
-                               AND `password` = '%s' AND `blocked` = 0 AND `verified` = 1 LIMIT 1",
+                               AND `password` = '%s' AND `blocked` = 0 AND `account_expired` = 0 AND `verified` = 1 LIMIT 1",
                                dbesc(trim($_POST['openid_url'])),
                                dbesc(trim($_POST['openid_url'])),
                                dbesc($encrypted)