diff --git a/lib/filesystem.php b/lib/filesystem.php
index 4635f8b4f305eaf629ee5c0aec68164230f9fa2e..aa03593908da288152355f8814c62d0345969f4d 100644
--- a/lib/filesystem.php
+++ b/lib/filesystem.php
@@ -232,8 +232,8 @@ class OC_Filesystem{
 			}
 		
 			if(isset($mountConfig['user'])) {
-				foreach($mountConfig['user'] as $user=>$mounts) {
-					if($user==='all' or strtolower($user)===strtolower($user)) {
+				foreach($mountConfig['user'] as $mountUser=>$mounts) {
+					if($user==='all' or strtolower($mountUser)===strtolower($user)) {
 						foreach($mounts as $mountPoint=>$options) {
 							$mountPoint=self::setUserVars($mountPoint, $user);
 							foreach($options as &$option) {