From 9ce6e2938cedc967026b68b5ce2cfb1cd291257e Mon Sep 17 00:00:00 2001 From: arnaud Date: Tue, 19 Jan 2016 09:46:27 +0100 Subject: [PATCH] FIX bookmark's user change after update if the user hasn't superadmin right --- htdocs/bookmarks/card.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index a821cf8e94f..fd46165b794 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -70,7 +70,9 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update') } if ($action == 'update') $bookmark->fetch($_POST["id"]); - $bookmark->fk_user=$userid; + // Check if null because user not admin can't set an user and send empty value here. + if(!empty($userid)) + $bookmark->fk_user=$userid; $bookmark->title=$title; $bookmark->url=$url; $bookmark->target=$target;