diff options
author | Yorhel <git@yorhel.nl> | 2010-01-26 19:51:30 +0100 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2010-01-26 19:51:30 +0100 |
commit | f82550b1cef9e91780b43e61c60c61af1ba139fd (patch) | |
tree | aa4d580db4e6558abb3e4a80a73aff529a64dd72 /lib/VNDB/DB/Users.pm | |
parent | 38174567d7f68a2751426c0fadcda5eca1bd6861 (diff) |
SQL: Replaced sessions.expiration with sessions.added
An expiration date doesn't make much sense if it's both not used and if
it can't be configured by the user, so just make this a timestamp to
indicate when the session has been added, which, while still not really
used, is more valuable.
Diffstat (limited to 'lib/VNDB/DB/Users.pm')
-rw-r--r-- | lib/VNDB/DB/Users.pm | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/VNDB/DB/Users.pm b/lib/VNDB/DB/Users.pm index 8805075f..63ac2270 100644 --- a/lib/VNDB/DB/Users.pm +++ b/lib/VNDB/DB/Users.pm @@ -137,12 +137,9 @@ sub dbUserDel { # Adds a session to the database -# If no expiration is supplied the database default is used -# uid, 40 character session token, expiration time (timestamp) +# uid, 40 character session token sub dbSessionAdd { - my($s, @o) = @_; - $s->dbExec(q|INSERT INTO sessions (uid, token, expiration) VALUES(?, decode(?, 'hex'), to_timestamp(?))|, - @o[0,1], $o[2]||(time+31536000)); + $_[0]->dbExec(q|INSERT INTO sessions (uid, token) VALUES(?, decode(?, 'hex'))|, @_[1,2]); } |