Skip to content
This repository has been archived by the owner on Apr 8, 2023. It is now read-only.

Commit

Permalink
Fix User ip address error
Browse files Browse the repository at this point in the history
Fixed display in admin dashboard where users ip address is not recorded

Issue #1
  • Loading branch information
jfm-so committed Feb 1, 2015
1 parent 3daebb1 commit 744fb52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function add($username, $password, $confirmPassword)
{
return "Username already taken";
} else {
$query = $this->mysqli->query("INSERT INTO users (`date`, `ip`, `username`, `password`) VALUES (\"" . date("n/j/Y g:i a") . "\", \"". $_SERVER['REMOTE_ADDR'] . "\", \"" . $username ."\", \"" . $password . "\");");
$query = $this->mysqli->query("INSERT INTO users (`date`, `ip`, `username`, `password`) VALUES (\"" . date("n/j/Y g:i a") . "\", \"". $_SERVER['HTTP_X_FORWARDED_FOR'] . "\", \"" . $username ."\", \"" . $password . "\");");
if ($query)
{
return true;
Expand Down Expand Up @@ -192,4 +192,4 @@ function adminDeprivilegeAccount($id)
}

}
?>
?>

0 comments on commit 744fb52

Please sign in to comment.