* Check if a user has a registration node and an event-registration node.
* @param $user
* User object to check.
* @return
* TRUE if the user has such nodes, otherwise FALSE.
*/
function user_has_unpublish_registration_nodes($account){
if(!is_object($account)&&!isset($account->uid)){
watchdog('evlka', t('Checking for unpublished registrations failed.'), array(), WATCHDOG_ERROR);
returnFALSE;
}
$has_registration = db_result(db_query("SELECT nid FROM {node} WHERE type = '%s' AND uid = %d AND status = %d", array('registration', $account->uid, 0)));
$has_event_registration = db_result(db_query("SELECT nid FROM {node} WHERE type = '%s' AND uid = %d AND status = %d", array('event_registration', $account->uid, 0)));