X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=include%2Foauth.php;h=6a1d72d178f413fb68a94b8f7a64c7c35cb4d045;hb=b5dccb0a956502ac41f5a7806e284b84807272cd;hp=de6f1e00db1199a4b032d0dacd821e0143ea780a;hpb=e50c0efcdfa05f682201deb630b6147755c87fe4;p=friendica.git diff --git a/include/oauth.php b/include/oauth.php index de6f1e00db..6a1d72d178 100644 --- a/include/oauth.php +++ b/include/oauth.php @@ -1,8 +1,8 @@ - * + * */ define('REQUEST_TOKEN_DURATION', 300); @@ -15,11 +15,11 @@ class FKOAuthDataStore extends OAuthDataStore { function gen_token(){ return md5(base64_encode(pack('N6', mt_rand(), mt_rand(), mt_rand(), mt_rand(), mt_rand(), uniqid()))); } - + function lookup_consumer($consumer_key) { logger(__function__.":".$consumer_key); //echo "
"; var_dump($consumer_key); killme();
-	  
+
 		$r = q("SELECT client_id, pw, redirect_uri FROM clients WHERE client_id='%s'",
 			dbesc($consumer_key)
 		);
@@ -129,7 +129,7 @@ class FKOAuth1 extends OAuthServer {
 		$this->add_signature_method(new OAuthSignatureMethod_PLAINTEXT());
 		$this->add_signature_method(new OAuthSignatureMethod_HMAC_SHA1());
 	}
-	
+
 	function loginUser($uid){
 		logger("FKOAuth1::loginUser $uid");
 		$a = get_app();
@@ -167,7 +167,7 @@ class FKOAuth1 extends OAuthServer {
 			$a->cid = $r[0]['id'];
 			$_SESSION['cid'] = $a->cid;
 		}
-		q("UPDATE `user` SET `login_date` = '%s' WHERE `uid` = %d LIMIT 1",
+		q("UPDATE `user` SET `login_date` = '%s' WHERE `uid` = %d",
 			dbesc(datetime_convert()),
 			intval($_SESSION['uid'])
 		);