We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Change email search | Forum

fbkca
fbkca Nov 25 '13
Hi, 


As the search is now, I'm not able to search for domain, or partial usernames. Anything that doesn't match from the first character onwards.


How can I change the search type to match in any part of the email address?


I tried looking through ow_system_plugins/admin/controllers/users.php but can't figure what would need to be changed...


Thanks

The Forum post is edited by fbkca Nov 25 '13
Daisy Team
Daisy Nov 27 '13
You can make changes in /private/ow_system_plugins/base/bol/user_dao.php file, search for the fcountUsersByQuestionValues function.
fbkca
fbkca Nov 27 '13
I have no function named fcountUsersByQuestionValues... you mean countUsersByQuestionValues?
fbkca
fbkca Nov 27 '13
Do I just need to modify the LIKE statement?


                    $where .= ' AND `user`.`' . $this->dbo->escapeString($question->name) . '` LIKE \'' . $this->dbo->escapeString($questionValues[$question->name]) . '%\'';

Daisy Team
Daisy Dec 10 '13
The function is  findUserIdListByQuestionValues 

The string should look like the following:

$where .= ' AND `user`.`' . $this->dbo->escapeString($question->name) . '` LIKE \'%' . $this->dbo->escapeString($questionValues[$question->name]) . '%\'';
fbkca
fbkca Dec 14 '13
Thanks so much!
Daisy Team
Daisy Dec 16 '13
You are welcome. :)