function twitter_actions_has_linked in Twitter 7.4
Same name and namespace in other branches
- 7.3 twitter_actions/twitter_actions.rules.inc \twitter_actions_has_linked()
The callback function for the Rules condition
Parameters
$element: $element['user']: The user to be checked for.
Return value
TRUE if the user has linked his/her Twitter account.
1 string reference to 'twitter_actions_has_linked'
- twitter_actions_rules_condition_info in twitter_actions/
twitter_actions.rules.inc - Implements hook_rules_condition_info().
File
- twitter_actions/
twitter_actions.rules.inc, line 106 - Provides Rules integration in order to post tweets.
Code
function twitter_actions_has_linked($element) {
return db_query("SELECT twitter_uid FROM {twitter_account} WHERE uid = :uid", array(
':uid' => $element['user']->uid,
))
->fetchField() ? TRUE : FALSE;
}