diff --git a/lib/log.php b/lib/log.php
index d51b2ef0785c7a8a4d428f6db8247b32341b54d0..1ed8e0e33c259a0416e7b46e57988548f55305eb 100644
--- a/lib/log.php
+++ b/lib/log.php
@@ -51,7 +51,7 @@ class OC_Log {
 	 * This function adds another entry to the log database
 	 */
 	public static function add( $appid, $subject, $predicate, $object = ' ' ){
-		$query=OC_DB::prepare("INSERT INTO `*PREFIX*log`(moment,appid,user,action,info) VALUES(NOW(),?,?,?,?)");
+		$query=OC_DB::prepare("INSERT INTO `*PREFIX*log`(moment,appid,`user`,action,info) VALUES(NOW(),?,?,?,?)");
 		$result=$query->execute(array($appid,$subject,$predicate,$object));
 		// Die if we have an error
 		if( PEAR::isError($result)) {
@@ -90,7 +90,7 @@ class OC_Log {
 			array_push($params,$filter('until'));
 		}
 		if(isset($filter['user'])){
-			$queryString.='AND user=? ';
+			$queryString.='AND `user`=? ';
 			array_push($params,$filter('user'));
 		}
 		if(isset($filter['app'])){
diff --git a/lib/ocs.php b/lib/ocs.php
index 8c7556a173bed797e01453fe8aaaef92cf76713b..bcacfe704c0bd4f099868e40eed50ff49ac648e4 100644
--- a/lib/ocs.php
+++ b/lib/ocs.php
@@ -407,7 +407,7 @@ class OC_OCS {
     $entry=$result->fetchRow();
     $totalcount=$entry['co'];
 	
-	$query=OC_DB::prepare('select id,timestamp,user,type,message from *PREFIX*log order by timestamp desc limit ?,?');
+	$query=OC_DB::prepare('select id,timestamp,`user`,type,message from *PREFIX*log order by timestamp desc limit ?,?');
     $result = $query->execute(array(($page*$pagesize),$pagesize))->fetchAll();
     
     $itemscount=count($result);