I have two questions about twitter module.
I want to hide global twitter account from twitter_account_list_form
, because authenticate user can delete global account, and i want to stop him.
I try with this in form_alter
$pom_array = array_keys($form['accounts']);
foreach ($pom_array as $key => $val) {
if (is_int($val)) {
if ($form['accounts'][$val]['#account']->is_global == 1 )
$form['accounts'][$key]['#prefix'] = '<div style="display:none;">';
$form['accounts'][$key]['#suffix'] = '</div>';
}
}
but without success.
And if node has option post to twitter.com, I want to hide that option also because authenticate can change message. I want in that case to post message for global and user's twitter account, if user already connected account with twitter.
Many thanks
$val
and$key
mixed up a bit especially in theif()
statement.$form['accounts'][$key]
and NOT$form['accounts'][$val]
?