diff options
Diffstat (limited to 'mod/twitterservice/views/default/usersettings')
-rw-r--r-- | mod/twitterservice/views/default/usersettings/twitterservice/edit.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mod/twitterservice/views/default/usersettings/twitterservice/edit.php b/mod/twitterservice/views/default/usersettings/twitterservice/edit.php new file mode 100644 index 000000000..95a2a2fd6 --- /dev/null +++ b/mod/twitterservice/views/default/usersettings/twitterservice/edit.php @@ -0,0 +1,21 @@ +<?php +/** + * + */ + +$user_id = get_loggedin_userid(); +$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'); + +echo '<p>' . elgg_echo('twitterservice:usersettings:description') . '</p>'; + +if (!$access_key || !$access_secret) { + // send user off to validate account + $request_link = twitterservice_get_authorize_url(); + echo '<p>' . sprintf(elgg_echo('twitterservice:usersettings:request'), $request_link) . '</p>'; +} else { + $url = "{$CONFIG->site->url}pg/twitterservice/revoke"; + echo '<p class="twitter_anywhere">' . sprintf(elgg_echo('twitterservice:usersettings:authorized'), $twitter_name) . '</p>'; + echo '<p>' . sprintf(elgg_echo('twitterservice:usersettings:revoke'), $url) . '</p>'; +} |