47
$user_handler =& xoops_getmodulehandler('profile', 'profile');
$criteria = new CriteriaCompo(new Criteria('source_language', $ads->getVar('ads_lang1')));
$criteria->add(new Criteria('target_language', $ads->getVar('ads_lang2')));
$users = $user_handler->getList($criteria);
unset($criteria);
$user_list = array_keys($users);
it works trabis. I have one more question. I have a field $vice_versa. How I do I also add users to $user_list for whom $vice_versa == 1 and $source_language == $ads_lang2 AND $target_language == $ads_lang1?
is it something like this?
$user_handler =& xoops_getmodulehandler('profile', 'profile');
$criteria = new CriteriaCompo(new Criteria('source_language', $ads->getVar('ads_lang1')));
$criteria->add(new Criteria('target_language', $ads->getVar('ads_lang2')));
if $vice_versa = 1 {
$criteria->add(new Criteria('source_language', $ads->getVar('ads_lang2')));
$criteria->add(new Criteria('target_language', $ads->getVar('ads_lang1')));
}
$users = $user_handler->getList($criteria);
unset($criteria);
$user_list = array_keys($users);