Patch #13041 ยป last_login.patch
| extra/svn/Redmine.pm | ||
|---|---|---|
| 340 | 340 |
return $res unless $res == OK; |
| 341 | 341 |
|
| 342 | 342 |
if (is_member($r->user, $redmine_pass, $r)) {
|
| 343 | 343 |
+ my $dbh = connect_database($r); |
| 344 | 344 |
+ my $sth = $dbh->prepare( |
| 345 | 345 |
+ "UPDATE users SET last_login_on = (?) WHERE login = (?);" |
| 346 | 346 |
+ ); |
| 347 | 347 |
+ $sth->bind_param(1, strftime "%Y-%m-%d %H:%M:%S", localtime); |
| 348 | 348 |
+ $sth->bind_param(2, $r->user); |
| 349 | 349 |
+ $sth->execute(); |
| 350 | 350 |
+ $sth->finish(); |
| 351 | 351 |
+ $dbh->disconnect(); |
| 352 | 352 |
return OK; |
| 353 | 353 |
} else {
|
| 354 | 354 |
$r->note_auth_failure(); |