From 9ec3760d55f6bdc32d1a1cd00b89a5cb858d3f93 Mon Sep 17 00:00:00 2001 From: oranges13 Date: Wed, 3 Jul 2019 09:25:08 -0400 Subject: [PATCH] Bugfix the Bugfix: https://laravel.com/docs/5.1/validation#rule-unique Unique validation only if email is changed --- application/app/Http/Controllers/UserController.php | 2 +- application/version | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/app/Http/Controllers/UserController.php b/application/app/Http/Controllers/UserController.php index f9e258e..94bedd3 100644 --- a/application/app/Http/Controllers/UserController.php +++ b/application/app/Http/Controllers/UserController.php @@ -92,7 +92,7 @@ public function update($id) $rules = array( 'name' => 'required|min:3|max:255', 'role' => 'required|numeric|role', - 'email' => 'required|email|max:255|unique:users,email', + 'email' => 'required|email|max:255|unique:users,email,'.$id , 'password' => 'confirmed|min:6' ); diff --git a/application/version b/application/version index 6a5e98a..cc90463 100644 --- a/application/version +++ b/application/version @@ -1 +1 @@ -v1.2.1 +v1.2.2