X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/03ad288aaa55a0bd0aa143711aa07d0f1801d604..refs/pull/4191/head:/app/Http/Controllers/UserController.php diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index 2fcfa4289..cd95f7220 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -197,7 +197,7 @@ class UserController extends Controller $this->checkPermissionOrCurrentUser('users-manage', $id); $user = $this->userRepo->getById($id); - $newOwnerId = $request->get('new_owner_id', null); + $newOwnerId = intval($request->get('new_owner_id')) ?: null; $this->userRepo->destroy($user, $newOwnerId);