aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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";