blob: 11afa6671536137806bc0420430c5764865f549d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<?php
/**
*
*/
$user_id = elgg_get_logged_in_user_guid();
$twitter_name = get_plugin_usersetting('twitter_name', $user_id, 'twitterservice');
$access_key = get_plugin_usersetting('access_key', $user_id, 'twitterservice');
$access_secret = get_plugin_usersetting('access_secret', $user_id, 'twitterservice');
$site_name = elgg_get_site_entity()->name;
echo '<p>' . elgg_echo('twitterservice:usersettings:description', array($site_name)) . '</p>';
if (!$access_key || !$access_secret) {
// send user off to validate account
$request_link = twitterservice_get_authorize_url();
echo '<p>' . elgg_echo('twitterservice:usersettings:request', array($request_link, $site_name)) . '</p>';
} else {
$url = elgg_get_site_url() . "pg/twitterservice/revoke";
echo '<p class="twitter_anywhere">' . elgg_echo('twitterservice:usersettings:authorized', array($site_name, $twitter_name)) . '</p>';
echo '<p>' . sprintf(elgg_echo('twitterservice:usersettings:revoke'), $url) . '</p>';
}
|