Add UserValidatorByMatrixUserName.
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-09-05 18:05:43 +03:00
parent 32cc601868
commit c592931101
2 changed files with 61 additions and 0 deletions
@@ -0,0 +1,17 @@
<?php
namespace App\Models\Validation\Validators;
use App\Models\Validation\Validators\NextValidatorByName;
use App\Models\User;
class UserValidatorByMatrixUserName extends NextValidatorByName
{
public function isCurrentValid(): bool
{
$count = User::where('matrix_username', $this->getName())->count();
return $count != 0;
}
}