aboutsummaryrefslogtreecommitdiff
path: root/mod/twitter_api/views
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2011-10-13 18:27:05 -0700
committerBrett Profitt <brett.profitt@gmail.com>2011-10-13 18:27:05 -0700
commitc095d1fddeced2415b6d780b4140457a5cda41d0 (patch)
treeb906f8d60e1359a75da673178bf8292c2af77aa9 /mod/twitter_api/views
parentef119763b51119a10851a7a3fb1258c7116a96c0 (diff)
downloadelgg-c095d1fddeced2415b6d780b4140457a5cda41d0.tar.gz
elgg-c095d1fddeced2415b6d780b4140457a5cda41d0.tar.bz2
Fixes #3177. Don't show the authorize twitter plugin setting if the admin hasn't set up the plugin.
Diffstat (limited to 'mod/twitter_api/views')
-rw-r--r--mod/twitter_api/views/default/plugins/twitter_api/usersettings.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/mod/twitter_api/views/default/plugins/twitter_api/usersettings.php b/mod/twitter_api/views/default/plugins/twitter_api/usersettings.php
index 65d04b883..edcea2f0d 100644
--- a/mod/twitter_api/views/default/plugins/twitter_api/usersettings.php
+++ b/mod/twitter_api/views/default/plugins/twitter_api/usersettings.php
@@ -9,6 +9,14 @@ $twitter_name = elgg_get_plugin_user_setting('twitter_name', $user_guid, 'twitte
$access_key = elgg_get_plugin_user_setting('access_key', $user_guid, 'twitter_api');
$access_secret = elgg_get_plugin_user_setting('access_secret', $user_guid, 'twitter_api');
+$site_key = elgg_get_plugin_setting('consumer_key', 'twitter_api');
+$site_secret = elgg_get_plugin_setting('consumer_secret', 'twitter_api');
+
+if (!($site_key && $site_secret)) {
+ echo '<div>' . elgg_echo('twitter_api:usersettings:site_not_configured') . '</div>';
+ return true;
+}
+
$site_name = elgg_get_site_entity()->name;
echo '<div>' . elgg_echo('twitter_api:usersettings:description', array($site_name)) . '</div>';