]> git.mxchange.org Git - friendica.git/blobdiff - include/auth.php
account expiration structures
[friendica.git] / include / auth.php
index 768af626fb5863a697e358cda29a793d82cf76e1..1f16b350479a9074da639249f35cb336eee229bc 100644 (file)
@@ -48,7 +48,8 @@ if((isset($_SESSION)) && (x($_SESSION,'authenticated')) && ((! (x($_POST,'auth-p
                        goaway(z_root());
                }
 
-               $r = q("SELECT * FROM `user` WHERE `uid` = %d LIMIT 1",
+               $r = q("SELECT `user`.*, `user`.`pubkey` as `upubkey`, `user`.`prvkey` as `uprvkey` 
+               FROM `user` WHERE `uid` = %d AND `blocked` = 0 AND `account_expired` = 0 AND `verified` = 1 LIMIT 1",
                        intval($_SESSION['uid'])
                );
 
@@ -183,8 +184,9 @@ else {
 
                        // process normal login request
 
-                       $r = q("SELECT * FROM `user` WHERE ( `email` = '%s' OR `nickname` = '%s' ) 
-                               AND `password` = '%s' AND `blocked` = 0 AND `verified` = 1 LIMIT 1",
+                       $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 `account_expired` = 0 AND `verified` = 1 LIMIT 1",
                                dbesc(trim($_POST['openid_url'])),
                                dbesc(trim($_POST['openid_url'])),
                                dbesc($encrypted)