diff --git a/plugins/publiclink/lib_public.php b/plugins/publiclink/lib_public.php
index 494f84fdb7abf3455d5e46451e4002aa3efda196..7c25c938fda53384aec66bb3a7eef39edd948f21 100644
--- a/plugins/publiclink/lib_public.php
+++ b/plugins/publiclink/lib_public.php
@@ -38,11 +38,8 @@ class OC_PublicLink{
 			$path=$data[0]['path'];
 			$user=$data[0]['user'];
 			
-			//login
-			$_SESSION['user_id']=$user;
-			
 			//prepare the filesystem
-			OC_UTIL::setupFS();
+			OC_UTIL::setupFS($user);
 			
 			//get time mimetype and set the headers
 			$mimetype=OC_FILESYSTEM::getMimeType($path);