| | |
| | | function __construct($p, $debug=false, $mail_domain=NULL) |
| | | { |
| | | $this->prop = $p; |
| | | |
| | | |
| | | if (isset($p['searchonly'])) |
| | | $this->searchonly = $p['searchonly']; |
| | | |
| | |
| | | $this->result->searchonly = true; |
| | | return $this->result; |
| | | } |
| | | |
| | | |
| | | // add general filter to query |
| | | if (!empty($this->prop['filter']) && empty($this->filter)) |
| | | { |
| | |
| | | else |
| | | $out[$rf] = $value; |
| | | } |
| | | |
| | | // Make sure name fields aren't arrays (#1488108) |
| | | if (is_array($out[$rf]) && in_array($rf, array('name', 'surname', 'firstname', 'middlename', 'nickname'))) { |
| | | $out[$rf] = $out[$rf][0]; |
| | | } |
| | | } |
| | | |
| | | return $out; |