mirror of
https://github.com/opensupports/opensupports.git
synced 2025-09-25 10:58:59 +02:00
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 {
|
class ValidOwnersId extends AbstractRule {
|
||||||
|
|
||||||
public function validate($owners) {
|
public function validate($owners) {
|
||||||
if(is_array(json_decode($owners))){
|
if(is_array(json_decode($owners))){
|
||||||
foreach (json_decode($owners) as $owner) {
|
foreach (json_decode($owners) as $owner) {
|
||||||
|
$author = \Staff::getDataStore($owner);
|
||||||
$author = \Ticket::getDataStore($owner, "owner_id");
|
if($author->isNull()) return false;
|
||||||
|
}
|
||||||
if($author->isNull()) return false;
|
return true;
|
||||||
}
|
}
|
||||||
return true;
|
return false;
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user