changeset 3845:eb8df08f88f5

merge 1.7
author Johannes Berg <johannes AT sipsolutions DOT net>
date Mon, 14 Jul 2008 13:15:35 +0200
parents 5c91b9e2b9fc (current diff) f40bd4c68aa2 (diff)
children 92ae3d3f0a31
files MoinMoin/user.py MoinMoin/wikiutil.py
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/user.py	Mon Jul 14 13:11:43 2008 +0200
+++ b/MoinMoin/user.py	Mon Jul 14 13:15:35 2008 +0200
@@ -316,7 +316,7 @@
         self.tz_offset = int(float(self._cfg.tz_offset) * 3600)
         self.language = ""
         self.real_language = "" # In case user uses "Browser setting". For language-statistics
-        self._loaded = False
+        self._stored = False
         self.date_fmt = ""
         self.datetime_fmt = ""
         self.quicklinks = self._cfg.quicklinks_default
@@ -483,8 +483,9 @@
         if not self.disabled:
             self.valid = 1
 
-        # Mark this user as loaded from disk, so UserCreatedEvent is not sent
-        self._loaded = True
+        # Mark this user as stored so saves don't send
+        # the "user created" event
+        self._stored = True
 
         # If user data has been changed, save fixed user data.
         if changed:
@@ -589,7 +590,8 @@
         if not self.disabled:
             self.valid = 1
 
-        if not self._loaded:
+        if not self._stored:
+            self._stored = True
             event = events.UserCreatedEvent(self._request, self)
             events.send_event(event)