From 064ee907d4ac7b5be27b87bc6d491c85c4506d97 Mon Sep 17 00:00:00 2001 From: David Neal Date: Wed, 1 Apr 2020 16:22:14 +0100 Subject: [PATCH] Fixes save of existing user for database users (#1574) * Typecasts $except to int in UniqueUserValue.php The value of `$except` is a string in a fresh v3 install (for me at least), the identical-to comparison operator therefore means it's not possible to edit an existing user. Typecasting `$except` to an integer fixes this. * Changes comparison operator to equal to in UniqueUserValue.php --- src/Validation/UniqueUserValue.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Validation/UniqueUserValue.php b/src/Validation/UniqueUserValue.php index b024926418..06c4513ea8 100644 --- a/src/Validation/UniqueUserValue.php +++ b/src/Validation/UniqueUserValue.php @@ -18,6 +18,6 @@ public function validate($attribute, $value, $parameters, $validator) return true; } - return $except === $existing->id(); + return $except == $existing->id(); } -} \ No newline at end of file +}