aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2011-06-24 14:55:59 -0400
committercash <cash.costello@gmail.com>2011-06-24 14:55:59 -0400
commitf44e7b8a6bad84423cf0e3dae700675c037d2d51 (patch)
tree9454b9bc0f170932191b84e11c388ceb703d35db /mod
parent870063759d4f820a841da2a1cf5953d71e7f9f42 (diff)
downloadelgg-f44e7b8a6bad84423cf0e3dae700675c037d2d51.tar.gz
elgg-f44e7b8a6bad84423cf0e3dae700675c037d2d51.tar.bz2
fixes the authorization to post so that it does not include login
Diffstat (limited to 'mod')
-rw-r--r--mod/twitter_api/lib/twitter_api.php7
-rw-r--r--mod/twitter_api/views/default/usersettings/twitter_api/edit.php4
2 files changed, 5 insertions, 6 deletions
diff --git a/mod/twitter_api/lib/twitter_api.php b/mod/twitter_api/lib/twitter_api.php
index 0621c2b13..145b37114 100644
--- a/mod/twitter_api/lib/twitter_api.php
+++ b/mod/twitter_api/lib/twitter_api.php
@@ -243,7 +243,6 @@ function twitter_api_authorize() {
),
'limit' => 0
);
-
$users = elgg_get_entities_from_plugin_user_settings($options);
if ($users) {
@@ -281,11 +280,11 @@ function twitter_api_revoke() {
}
/**
- * Returns the url to authorize a user.
+ * Gets the url to authorize a user.
*
* @param string $callback The callback URL
*/
-function twitter_api_get_authorize_url($callback = NULL) {
+function twitter_api_get_authorize_url($callback = NULL, $login = true) {
global $SESSION;
elgg_load_library('twitter_oauth');
@@ -302,7 +301,7 @@ function twitter_api_get_authorize_url($callback = NULL) {
'oauth_token_secret' => $token['oauth_token_secret'],
);
- return $twitter->getAuthorizeURL($token['oauth_token']);
+ return $twitter->getAuthorizeURL($token['oauth_token'], $login);
}
/**
diff --git a/mod/twitter_api/views/default/usersettings/twitter_api/edit.php b/mod/twitter_api/views/default/usersettings/twitter_api/edit.php
index 77dd5cc5d..0898087ca 100644
--- a/mod/twitter_api/views/default/usersettings/twitter_api/edit.php
+++ b/mod/twitter_api/views/default/usersettings/twitter_api/edit.php
@@ -1,6 +1,6 @@
<?php
/**
- *
+ * User settings for Twitter API
*/
$user_id = elgg_get_logged_in_user_guid();
@@ -13,7 +13,7 @@ echo '<div>' . elgg_echo('twitter_api:usersettings:description', array($site_nam
if (!$access_key || !$access_secret) {
// send user off to validate account
- $request_link = twitter_api_get_authorize_url();
+ $request_link = twitter_api_get_authorize_url(null, false);
echo '<div>' . elgg_echo('twitter_api:usersettings:request', array($request_link, $site_name)) . '</div>';
} else {
$url = elgg_get_site_url() . "twitter_api/revoke";