/[glsr]/trunk/site/user.py
Gentoo

Diff of /trunk/site/user.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 49 Revision 50
43 "SET session_id = %s", sid, fetch='none') 43 "SET session_id = %s", sid, fetch='none')
44 44
45 def get_session(self): 45 def get_session(self):
46 46
47 return self.__db.query("SELECT user_sid FROM %(prefix)suser" % \ 47 return self.__db.query("SELECT user_sid FROM %(prefix)suser" % \
48 {'prefix': config.fb['prefix']}, fetch='one') 48 {'prefix': config.fb['prefix']}, fetch='one')['user_sid']
49 49
50 def get_passwd(self): 50 def get_passwd(self):
51 51
52 return self.__db.query("SELECT user_passwd FROM %(prefix)suser" % \ 52 return self.__db.query("SELECT user_passwd FROM %(prefix)suser" % \
53 {'prefix': config.db['prefix']}, fetch='one') 53 {'prefix': config.db['prefix']}, fetch='one')['user_passwd']
54
55 def set_last_ip(self, ip): 54 def set_last_ip(self, ip):
56 55
57 self.__db.query("UPDATE %(prefix)suser " % {'prefix': config.db['prefix']} + 56 self.__db.query("UPDATE %(prefix)suser " % {'prefix': config.db['prefix']} +
58 "SET user_lastip = %s", sid, fetch='none') 57 "SET user_lastip = %s", sid, fetch='none')
59 58
60 def get_last_ip(self): 59 def get_last_ip(self):
61 60
62 return self.__db.query("SELECT user_ip FROM $(prefix)suser" % \ 61 return self.__db.query("SELECT user_ip FROM $(prefix)suser" % \
63 {'prefix': config.db['prefix']}, fetch='one') 62 {'prefix': config.db['prefix']}, fetch='one')['user_lastip']
64 63
65 64

Legend:
Removed from v.49  
changed lines
  Added in v.50

  ViewVC Help
Powered by ViewVC 1.1.20