Added visibility check and made sure user_id is set as a variable to be used

Signed-off-by: Malte Sussdorff <malte.sussdorff@cognovis.com>