mirror of
https://github.com/opensupports/opensupports.git
synced 2025-04-08 18:35:06 +02:00
* 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
18 lines
412 B
PHP
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;
|
|
}
|
|
} |