]> git.mxchange.org Git - friendica.git/commitdiff
Simplify openid query, and (needlessly) quote all fields
authorSandro Santilli <strk@kbt.io>
Wed, 25 May 2016 14:06:16 +0000 (16:06 +0200)
committerSandro Santilli <strk@kbt.io>
Wed, 25 May 2016 14:06:16 +0000 (16:06 +0200)
Fields quoting was requested by rabuzarus

mod/openid.php

index 893db8030d8fca9f8c226b13a5a89e6e9c7afefc..0ebda485d023a5cf090aed7138a824538f71e7f1 100644 (file)
@@ -18,7 +18,6 @@ function openid_content(&$a) {
 
                if($openid->validate()) {
 
-                       #$authid = normalise_openid($_REQUEST['openid_identity']);
                        $authid = $_REQUEST['openid_identity'];
 
                        if(! strlen($authid)) {
@@ -31,9 +30,11 @@ function openid_content(&$a) {
                        //       mod/settings.php in 8367cad so it might have left mixed
                        //       records in the user table
                        //
-                       $r = q("SELECT `user`.*, `user`.`pubkey` as `upubkey`, `user`.`prvkey` as `uprvkey` 
-                               FROM `user` WHERE ( openid = '%s' OR openid = '%s' ) AND blocked = 0
-                               AND `account_expired` = 0 AND `account_removed` = 0 AND `verified` = 1 LIMIT 1",
+                       $r = q("SELECT * FROM `user`
+                               WHERE ( `openid` = '%s' OR `openid` = '%s' )
+                               AND `blocked` = 0 AND `account_expired` = 0
+                               AND `account_removed` = 0 AND `verified` = 1
+                               LIMIT 1",
                                dbesc($authid), dbesc(normalise_openid($authid))
                        );