DrupalBin
Submit Code
About
Recent Posts
How do i make this work in D6 (I have to clear the cache everytime to see the tabs)
47 min 33 sec
ago
Code
1 hour 42 min
ago
Code
5 hours 41 min
ago
oopsie in modules/taxonomy/taxonomy.test
7 hours 39 min
ago
more
Tags
CCK
drupal
fapi
jquery
menu
module
Panels
php
simpletest
test
theme
views
more tags
User login
Log in using OpenID:
What is OpenID?
Username:
*
Password:
*
Create new account
Request new password
Log in using OpenID
Cancel OpenID login
Home
Fix for oauth.module
View
Download
Fix
This fix will not be saved to the database until you submit.
Summary:
Tags:
Any tags you'd like to associate with your code, delimitered by commas (example: Views, CCK, Module, etc).
Source code:
*
$services_oauth[$method_name]['permission'] = 0; } } $services_oauth_serialized = serialize($services_oauth); //drupal_set_message('<pre>'.print_r($user->sid, TRUE).'</pre>'); db_query("INSERT INTO { oauth_services } (uid, consumer_key, services, timestamp, sid ) VALUES (%d, '%s', '%s', %d, '%s')", $user->uid, $form_state['values']['oauth_consumer_key'], $services_oauth_serialized, $form_state['values']['oauth_nonce_timestamp'], $user->sid) ; $server = _oauth_init_server(); $q = $_GET['q']; unset($_GET['q']); try { $req = OAuthRequest::from_request(); oauth_authorize_request_token($form_state['values']['oauth_token']); //drupal_goto($req->get_parameter('oauth_callback')); } catch (OAuthException $e) { print($e->getMessage() . "\n<hr />\n"); print_r($req); die(); } // Set the $_GET['q'] back to it's original value $_GET['q'] = $q; $form_state['redirect'] = $form_state['values']['oauth_callback']; } /** * Authorize a request token * * Set the authorized property for the token, to allow an access token to be generated, * also set the UID of the request token. * * @param key * Request token key. */ function oauth_authorize_request_token($key) { global $user; db_query("UPDATE {oauth_token} SET authorized = 1, uid=%d WHERE token_key = '%s'", $user->uid, $key); }
Syntax highlighting mode:
ActionScript
ColdFusion
Diff
Drupal
Drupal 5
Drupal 6
HTML
Javascript
MySQL
PHP
Python
robots.txt
SQL
Text
Select the syntax highlighting mode to use.