Changeset 2707 for pykota/trunk/pykota/storages/ldapstorage.py
- Timestamp:
- 02/18/06 11:56:29 (18 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/storages/ldapstorage.py
r2706 r2707 1048 1048 self.doModify(user.ident, newfields) 1049 1049 1050 newfields = { "pykotaBalance" : str(user.AccountBalance or 0.0), 1051 "pykotaLifeTimePaid" : str(user.LifeTimePaid or 0.0), 1052 } 1053 self.doModify(user.idbalance, newfields) 1054 1050 1055 def saveGroup(self, group) : 1051 1056 """Saves the group to the database in a single operation.""" … … 1096 1101 return self.doModify(user.idbalance, fields, flushcache=1) 1097 1102 1098 def writeUserAccountBalance(self, user, newbalance, newlifetimepaid=None) :1099 """Sets the new account balance and eventually new lifetime paid."""1100 fields = {1101 "pykotaBalance" : str(newbalance),1102 }1103 if newlifetimepaid is not None :1104 fields.update({ "pykotaLifeTimePaid" : str(newlifetimepaid) })1105 return self.doModify(user.idbalance, fields)1106 1107 1103 def writeNewPayment(self, user, amount, comment="") : 1108 1104 """Adds a new payment to the payments history."""