Added checking user tags in event list

This commit is contained in:
danielmaya 2018-04-17 10:10:18 +02:00
parent bc251e58df
commit 70bf27f48a

View File

@ -235,6 +235,18 @@ else {
//Search by tag //Search by tag
if (!empty($tag_with)) { if (!empty($tag_with)) {
if (!users_is_admin()) {
$user_tags = array_flip(tags_get_tags_for_module_search());
if($user_tags != null){
foreach ($tag_with as $id_tag) {
if (!array_search($id_tag,$user_tags)) {
return false;
}
}
}
}
$sql_post .= ' AND ( '; $sql_post .= ' AND ( ';
$first = true; $first = true;
$filter_resume['tag_inc'] = $tag_with; $filter_resume['tag_inc'] = $tag_with;