Project

General

Profile

Patch #13041 ยป last_login.patch

Mirko Stocker, 2013-01-31 11:11

View differences:

extra/svn/Redmine.pm
return $res unless $res == OK;
if (is_member($r->user, $redmine_pass, $r)) {
+ my $dbh = connect_database($r);
+ my $sth = $dbh->prepare(
+ "UPDATE users SET last_login_on = (?) WHERE login = (?);"
+ );
+ $sth->bind_param(1, strftime "%Y-%m-%d %H:%M:%S", localtime);
+ $sth->bind_param(2, $r->user);
+ $sth->execute();
+ $sth->finish();
+ $dbh->disconnect();
return OK;
} else {
$r->note_auth_failure();
    (1-1/1)