mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 09:43:03 +00:00
Save last login IP address
Save the IP address used for the last login in the "Users" table. This makes it a bit easier to create IP ban lists for spammers without looking at web server logs. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
de39a712b0
commit
5660816ea0
3 changed files with 13 additions and 1 deletions
|
@ -444,7 +444,8 @@ function try_login() {
|
|||
}
|
||||
|
||||
if ($logged_in) {
|
||||
$q = "UPDATE Users SET LastLogin = UNIX_TIMESTAMP() ";
|
||||
$q = "UPDATE Users SET LastLogin = UNIX_TIMESTAMP(), ";
|
||||
$q.= "LastLoginIPAddress = " . $dbh->quote(ip2long($_SERVER['REMOTE_ADDR'])) . " ";
|
||||
$q.= "WHERE ID = '$userID'";
|
||||
$dbh->exec($q);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue