]> BookStack Code Mirror - bookstack/commitdiff
Fixed bug preventing LDAP users updating thier profile
authorDan Brown <redacted>
Mon, 8 Feb 2016 20:35:23 +0000 (20:35 +0000)
committerDan Brown <redacted>
Mon, 8 Feb 2016 20:35:23 +0000 (20:35 +0000)
Made email not required when a profile is updated. LDAP users without admin privileges could did not have an email field to submit therefore could previously not update thier profile.

app/Http/Controllers/UserController.php

index 325d3118f947acb42b310d3ea24a29af4658b1ee..bf25eafb2d8ad544a4a408f32e4ceec6b75f27a8 100644 (file)
@@ -130,8 +130,8 @@ class UserController extends Controller
         });
 
         $this->validate($request, [
-            'name'             => 'required',
-            'email'            => 'required|email|unique:users,email,' . $id,
+            'name'             => 'min:2',
+            'email'            => 'min:2|email|unique:users,email,' . $id,
             'password'         => 'min:5|required_with:password_confirm',
             'password-confirm' => 'same:password|required_with:password',
             'role'             => 'exists:roles,id'
Morty Proxy This is a proxified and sanitized view of the page, visit original site.