Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
With Oath Provider UI enabled, whenever I click on the Authorization tab on a user profile, I get the following errors:
warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "WHERE" LINE 2: INNER JOIN oauth_common_provider_token pt WHERE t.uid = ... ^ in /home/suresupply/public_html/includes/database.pgsql.inc on line 138.
user warning: query: SELECT t.*, pt.created, pt.changed, pt.services, pt.authorized FROM oauth_common_token t INNER JOIN oauth_common_provider_token pt WHERE t.uid = 3 AND t.type = 1 in /home/suresupply/public_html/sites/all/modules/oauth/oauth_common.module on line 415.
This is in the oauth_common_get_user_provider_tokens function:
$res = db_query("SELECT t.*, pt.created, pt.changed, pt.services, pt.authorized FROM {oauth_common_token} t
INNER JOIN {oauth_common_provider_token} pt WHERE t.uid = %d AND t.type = %d", array(
':uid' => $uid,
':type' => OAUTH_COMMON_TOKEN_TYPE_ACCESS,
));
, and though we're running on PostgreSQL here, I don't think this will fly on MySQL either. There's no join condition (ON clause) for the INNER JOIN. I'm kind of surprised this has lasted this long, unless it's just that so few people enable Oath Provider UI.