seach valid staff to validownersid
This commit is contained in:
parent
46ca19c2cc
commit
f4b3ea2a65
|
@ -7,15 +7,13 @@ use Respect\Validation\Rules\AbstractRule;
|
|||
class ValidOwnersId extends AbstractRule {
|
||||
|
||||
public function validate($owners) {
|
||||
if(is_array(json_decode($owners))){
|
||||
foreach (json_decode($owners) as $owner) {
|
||||
|
||||
$author = \Ticket::getDataStore($owner, "owner_id");
|
||||
|
||||
if($author->isNull()) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
if(is_array(json_decode($owners))){
|
||||
foreach (json_decode($owners) as $owner) {
|
||||
$author = \Staff::getDataStore($owner);
|
||||
if($author->isNull()) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue