]> BookStack Code Mirror - bookstack/blobdiff - app/Http/Controllers/UserController.php
Fixed linting and failing test issues from dropzone work
[bookstack] / app / Http / Controllers / UserController.php
index 2fcfa4289e20ec31f47f1aa5dd52f8e461d73508..cd95f7220766fb6598567afe8ca9d2d7098ac331 100644 (file)
@@ -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);