Skip to content

Commit

Permalink
Fixes save of existing user for database users (#1574)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
davidsneal authored Apr 1, 2020
1 parent b6464c7 commit 064ee90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Validation/UniqueUserValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ public function validate($attribute, $value, $parameters, $validator)
return true;
}

return $except === $existing->id();
return $except == $existing->id();
}
}
}

0 comments on commit 064ee90

Please sign in to comment.