Skip to content

Commit

Permalink
Set lastaccess to initial create time, to avoid confusion.
Browse files Browse the repository at this point in the history
Fixes 920, which was entirely me being silly -- but I think this is better behaviour.
  • Loading branch information
anall committed Aug 10, 2014
1 parent 99e7672 commit 38acf2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cgi-bin/DW/OAuth/Access.pm
Expand Up @@ -166,8 +166,8 @@ sub new {
$opts{secret} = $secret;

my $dbh = LJ::get_db_writer();
$dbh->do( "INSERT INTO oauth_access_token (consumer_id, userid, token, secret, createtime) VALUES (?,?,?,?,?)",undef,
$opts{consumer_id}, $opts{userid}, $opts{token}, $opts{secret}, time() ) or die $dbh->errstr;
$dbh->do( "INSERT INTO oauth_access_token (consumer_id, userid, token, secret, createtime, lastaccess) VALUES (?,?,?,?,?,?)",undef,
$opts{consumer_id}, $opts{userid}, $opts{token}, $opts{secret}, time(), time() ) or die $dbh->errstr;

$class->_clear_user_tokens( $opts{userid} );

Expand Down

0 comments on commit 38acf2e

Please sign in to comment.