Changeset 3127
- Timestamp:
- 01/22/08 11:36:42 (8 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
teamrosterplugin/0.11/tracteamroster/userprofiles_stores.py
r3126 r3127 7 7 # 8 8 import traceback 9 import time 9 10 from StringIO import StringIO 10 11 … … 117 118 return False 118 119 120 # initialize user session 121 db = self.env.get_db_cnx() 122 cursor=db.cursor() 123 try: 124 cursor.execute("INSERT INTO session (sid, last_visit, authenticated)" 125 " VALUES(%s,%s,1)", [userProfile.id, int(time.time())]) 126 except Exception, e: 127 self.log.debug("Session for %s exists, no need to re-create it."%(userProfile.id)) 128 129 # enable user 119 130 userProfile.enabled = "1" 120 131 userProfile.store = self … … 131 142 if not isinstance(userProfile, UserProfile): 132 143 raise TracError("Class %s is not a instance of UserProfile class"%(userProfile.__class__.__name__)) 144 133 145 134 146 # grabing the old version in order identify the changes … … 317 329 return False 318 330 331 # initialize user session 332 db = self.env.get_db_cnx() 333 cursor=db.cursor() 334 try: 335 cursor.execute("INSERT INTO session (sid, last_visit, authenticated)" 336 " VALUES(%s,%s,1)", [userProfile.id, int(time.time())]) 337 except Exception, e: 338 self.log.debug("Session for %s exists, no need to re-create it."%(userProfile.id)) 339 340 # enable user 319 341 userProfile.enabled = "1" 320 342 userProfile.store = self
