if ($terms) {
// Multiple search terms okay
$aTerms = explode(' ', $terms);
- $aTerms = array_map('trim', $aTerms);
+ $aTerms = array_map('trim', $aTerms);
// Search terms in tags as well when none given
if (!count($tags)) {
for ($i = 0; $i < count($aTerms); $i++) {
$query_4 .= ' AND (B.bTitle LIKE "%'. $this->db->sql_escape($aTerms[$i]) .'%"';
$query_4 .= ' OR B.bDescription LIKE "%'. $this->db->sql_escape($aTerms[$i]) .'%"';
+ $query_4 .= ' OR U.username = "'. $this->db->sql_escape($aTerms[$i]) .'"'; //exact match for username
if ($dotags) {
$query_4 .= ' OR T.tag = "'. $this->db->sql_escape($aTerms[$i]) .'"';
}