public function OAuthHTTPFetcher::sourceForm in Feeds OAuth 6
Same name and namespace in other branches
- 7 OAuthHTTPFetcher.inc \OAuthHTTPFetcher::sourceForm()
Expose source form.
Overrides FeedsHTTPFetcher::sourceForm
File
- ./
OAuthHTTPFetcher.inc, line 137
Class
- OAuthHTTPFetcher
- Support OAuth authentication.
Code
public function sourceForm($source_config) {
$form = parent::sourceForm($source_config);
global $user;
$access_tokens = call_user_func($this->config['authenticator'], $user->uid, $this->config['site_id']);
if (empty($access_tokens) && !empty($this->config['site_id'])) {
drupal_set_message(t('Could not find OAuth access tokens for site %site. You should probably <a href="@url">authenticate first</a> to access protected information.', array(
'%site' => $this->config['site_id'],
'@url' => url('feeds/oauth/authenticate/' . $this->id),
)), 'warning', FALSE);
}
return $form;
}