FIX bookmark's user change after update if the user hasn't superadmin right

This commit is contained in:
arnaud 2016-01-19 09:46:27 +01:00
parent 2386b79dfc
commit 9ce6e2938c

View File

@ -70,6 +70,8 @@ if ($action == 'add' || $action == 'addproduct' || $action == 'update')
} }
if ($action == 'update') $bookmark->fetch($_POST["id"]); if ($action == 'update') $bookmark->fetch($_POST["id"]);
// 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->fk_user=$userid;
$bookmark->title=$title; $bookmark->title=$title;
$bookmark->url=$url; $bookmark->url=$url;