From dc256583d410cb09253e30b075149c79fb4864e5 Mon Sep 17 00:00:00 2001 From: snipe Date: Fri, 6 Jun 2014 13:40:54 -0400 Subject: [PATCH] Fixes #144 --- app/controllers/admin/UsersController.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/app/controllers/admin/UsersController.php b/app/controllers/admin/UsersController.php index a109f8b6a0..b56a61d7a8 100755 --- a/app/controllers/admin/UsersController.php +++ b/app/controllers/admin/UsersController.php @@ -267,6 +267,7 @@ class UsersController extends AdminController { // Create a new validator instance from our validation rules $validator = Validator::make(Input::all(), $this->validationRules); + // If validation fails, we'll exit the operation now. if ($validator->fails()) { @@ -287,6 +288,14 @@ class UsersController extends AdminController { $user->location_id = Input::get('location_id'); $user->manager_id = Input::get('manager_id'); + if ($user->manager_id == "") { + $user->manager_id = NULL; + } + + if ($user->location_id == "") { + $user->location_id = NULL; + } + // Do we want to update the user password? if ($password)