Merge pull request #490 from AGuyNamedJens/patch-2
Fixes an issue when you update a user since update
This commit is contained in:
commit
041f390b1b
1 changed files with 1 additions and 7 deletions
|
@ -123,15 +123,9 @@ class UserController extends Controller
|
|||
"credits" => "required|numeric|min:0|max:99999999",
|
||||
"server_limit" => "required|numeric|min:0|max:1000000",
|
||||
"role" => Rule::in(['admin', 'mod', 'client', 'member']),
|
||||
"referral_code" => "required|string|min:2|max:32",
|
||||
"referral_code" => "required|string|min:2|max:32|unique:users,referral_code,{$user->id}",
|
||||
]);
|
||||
|
||||
if (User::where('referral_code', '=', $request->input('referral_code'))->exists()) {
|
||||
throw ValidationException::withMessages([
|
||||
'referral_code' => [__("Another User with this Referral-Code already exists!")]
|
||||
]);
|
||||
}
|
||||
|
||||
if (isset($this->pterodactyl->getUser($request->input('pterodactyl_id'))['errors'])) {
|
||||
throw ValidationException::withMessages([
|
||||
'pterodactyl_id' => [__("User does not exists on pterodactyl's panel")]
|
||||
|
|
Loading…
Add table
Reference in a new issue