X-Git-Url: http://git.roojs.org/?p=Pman.Core;a=blobdiff_plain;f=DataObjects%2FCore_person.php;fp=DataObjects%2FCore_person.php;h=1498a611b3483df2405a65ace906dc94f4ed699f;hp=2a3ac074568481184ab50373508cf71246d1e484;hb=f7c300d97be885fc7029cd070422bf0baf0275d4;hpb=02a5255a222db8b3c7b423f15e58a9dfa03421ba diff --git a/DataObjects/Core_person.php b/DataObjects/Core_person.php index 2a3ac074..1498a611 100644 --- a/DataObjects/Core_person.php +++ b/DataObjects/Core_person.php @@ -1093,6 +1093,14 @@ class Pman_Core_DataObjects_Core_person extends DB_DataObject {$this->tableName()}.name LIKE '%{$this->escape($q['query']['name'])}%' "); } + + if(!empty($q['query']['name_or_email'])){ + $this->whereAdd(" + {$this->tableName()}.name LIKE '%{$this->escape($q['query']['name'])}%' + OR + {$this->tableName()}.email LIKE '%{$this->escape($q['query']['name'])}%' + "); + } if(!empty($q['query']['name_starts'])){ $this->whereAdd(" {$this->tableName()}.name LIKE '{$this->escape($q['query']['name_starts'])}%'