Index: pykota/trunk/pykota/storages/sql.py
===================================================================
--- pykota/trunk/pykota/storages/sql.py (revision 2698)
+++ pykota/trunk/pykota/storages/sql.py (revision 2706)
@@ -545,4 +545,9 @@
             self.doModify("INSERT INTO groupsmembers (groupid, userid) VALUES (%s, %s)" % (self.doQuote(group.ident), self.doQuote(user.ident)))
             
+    def delUserFromGroup(self, user, group) :    
+        """Removes an user from a group."""
+        self.doModify("DELETE FROM groupsmembers WHERE groupid=%s AND userid=%s" % \
+                       (self.doQuote(group.ident), self.doQuote(user.ident)))
+            
     def addUserPQuota(self, user, printer) :
         """Initializes a user print quota on a printer."""
@@ -564,16 +569,20 @@
                                  self.doQuote(printer.PricePerJob), \
                                  self.doQuote(printer.ident)))
-        
-    def writeUserOverCharge(self, user, factor) :
-        """Sets the user's overcharging coefficient."""
-        self.doModify("UPDATE users SET overcharge=%s WHERE id=%s" % (self.doQuote(factor), self.doQuote(user.ident)))
-        
-    def writeUserLimitBy(self, user, limitby) :    
-        """Sets the user's limiting factor."""
-        self.doModify("UPDATE users SET limitby=%s WHERE id=%s" % (self.doQuote(limitby), self.doQuote(user.ident)))
-        
-    def writeGroupLimitBy(self, group, limitby) :    
-        """Sets the group's limiting factor."""
-        self.doModify("UPDATE groups SET limitby=%s WHERE id=%s" % (self.doQuote(limitby), self.doQuote(group.ident)))
+                                 
+    def saveUser(self, user) :        
+        """Saves the user to the database in a single operation."""
+        self.doModify("UPDATE users SET limitby=%s, email=%s, overcharge=%s, description=%s WHERE id=%s" \
+                               % (self.doQuote(user.LimitBy or 'quota'), \
+                                  self.doQuote(user.Email), \
+                                  self.doQuote(user.OverCharge), \
+                                  self.doQuote(self.userCharsetToDatabase(user.Description)), \
+                                  self.doQuote(user.ident)))
+                                  
+    def saveGroup(self, group) :        
+        """Saves the group to the database in a single operation."""
+        self.doModify("UPDATE groups SET limitby=%s, description=%s WHERE id=%s" \
+                               % (self.doQuote(group.LimitBy or 'quota'), \
+                                  self.doQuote(self.userCharsetToDatabase(group.Description)), \
+                                  self.doQuote(group.ident)))
         
     def writeUserPQuotaDateLimit(self, userpquota, datelimit) :    
Index: pykota/trunk/pykota/storages/ldapstorage.py
===================================================================
--- pykota/trunk/pykota/storages/ldapstorage.py (revision 2697)
+++ pykota/trunk/pykota/storages/ldapstorage.py (revision 2706)
@@ -982,4 +982,8 @@
                 group.Members.append(user)
                 
+    def delUserFromGroup(self, user, group) :    
+        """Removes an user from a group."""
+        raise "Not Implemented !" # TODO !!!
+                
     def addUserPQuota(self, user, printer) :
         """Initializes a user print quota on a printer."""
@@ -1032,24 +1036,24 @@
         self.doModify(printer.ident, fields)
         
-    def writeUserOverCharge(self, user, factor) :
-        """Sets the user's overcharging coefficient."""
-        fields = {
-                   "pykotaOverCharge" : str(factor),
-                 }
-        self.doModify(user.ident, fields)
-        
-    def writeUserLimitBy(self, user, limitby) :    
-        """Sets the user's limiting factor."""
-        fields = {
-                   "pykotaLimitBy" : limitby,
-                 }
-        self.doModify(user.ident, fields)         
-        
-    def writeGroupLimitBy(self, group, limitby) :    
-        """Sets the group's limiting factor."""
-        fields = {
-                   "pykotaLimitBy" : limitby,
-                 }
-        self.doModify(group.ident, fields)         
+    def saveUser(self, user) :
+        """Saves the user to the database in a single operation."""
+        newfields = {
+                       "pykotaLimitBy" : (user.LimitBy or "quota"),
+                       "pykotaOverCharge" : str(user.OverCharge),
+                    }   
+        if user.Email :
+            newfields.update({self.info["usermail"]: user.Email})
+        if user.Description is not None : 
+            newfields.update({"description": self.userCharsetToDatabase(user.Description)})
+        self.doModify(user.ident, newfields)
+        
+    def saveGroup(self, group) :
+        """Saves the group to the database in a single operation."""
+        newfields = {
+                       "pykotaLimitBy" : (group.LimitBy or "quota"),
+                    }   
+        if group.Description is not None : 
+            newfields.update({"description": self.userCharsetToDatabase(group.Description)})
+        self.doModify(group.ident, newfields)
         
     def writeUserPQuotaDateLimit(self, userpquota, datelimit) :    
