Testing a modified match function

This commit is contained in:
erth9960 2021-09-08 11:03:46 +02:00
parent ec6196b6a8
commit a20ffeb3c2

@ -47,7 +47,7 @@ class User extends Entity {
return true;
}
public function matches($terms) {
public function matches($terms, $matchAll=false) {
$terms = $this->specify_search($terms, array('name',
'email',
'notes'));
@ -75,6 +75,9 @@ class User extends Entity {
break;
}
}
if($matchAll && array_diff_assoc($terms, $matches)) {
return array();
}
return $matches;
}