opensupports/server/libs/validations/validUsersId.php
Guillermo Giuliana cd73606852
Super user feature (#841)
* add ruby tests

* update ruby test

* backend part

* add get-supervised-ticket path and ruby tests

* update search-authors path and custom validation to get-supervised-tickets

* add supervised users components and css

* add supervised-users messages

* resolve minor bugs get super ticket, ruby tests and change file name

* add supervisor options on user panel

* change supervisor structure

* add pagination dashboard supervisor tickets

* change error name

* add error to path edit-supervised-list

* fix github comments

* resolve github comment backend

* add minor changes dashboard list tickets page
2020-07-21 06:52:34 -03:00

18 lines
412 B
PHP

<?php
namespace CustomValidations;
use Respect\Validation\Rules\AbstractRule;
class ValidUsersId extends AbstractRule {
public function validate($userIdList) {
if(is_array(json_decode($userIdList))){
foreach (json_decode($userIdList) as $userItem) {
$author = \User::getDataStore($userItem);
if($author->isNull()) return false;
}
return true;
}
return false;
}
}