$user = common_current_user();
$profile = $user->getProfile();
- $fuser = Foreign_user::getForeignUser($user->id, 0);
+ $fuser = Foreign_user::getForeignUser($user->id, 1);
$this->form_header(_('Twitter settings'), $msg, $success);
common_element_start('p');
- common_element('span', 'Twitter User', "http://www.twitter.com/$fuser->nickname");
+ common_element('span', 'Twitter User', $fuser->uri);
common_element('span', 'input_instructions',
_('Current verified Twitter User'));
common_hidden('fuser_id', $fuser->id);
function add_twitter_acct() {
$user = common_current_user();
- $fuser = Foreign_user::getForeignUser($user->id, 0);
+ $fuser = Foreign_user::getForeignUser($user->id, 1);
$twitter_username = $this->trimmed('twitter_username');
$fuser = Foreign_user::save(
array(
'id' => $twitter_id,
- 'service' => '0', // Twitter
+ 'service' => '1', // 1 == Twitter
'uri' => "http://www.twitter.com/$twitter_username",
'nickname' => $twitter_username,
'user_id' => $user->id,
function remove_twitter_acct() {
$user = common_current_user();
- $fuser = Foreign_user::getForeignUser($user->id, 0);
+ $fuser = Foreign_user::getForeignUser($user->id, 1);
$fuser_id = $this->arg('fuser_id');
function save_preferences() {
$user = common_current_user();
- $fuser = Foreign_user::getForeignUser($user->id, 0);
+ $fuser = Foreign_user::getForeignUser($user->id, 1);
$this->show_form(_('Save doesn\'t do anything yet.'));
insert into foreign_service
- (name, description, created)
+ (id, name, description, created)
values
- ('Twitter', 'Twitter Micro-blogging service', now());
+ ('1','Twitter', 'Twitter Micro-blogging service', now());