Skip to content

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 jfm-so#1
  • Loading branch information
jfm-so committed Feb 1, 2015
1 parent 3420b6b commit 64324b0
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 64324b0

Please sign in to comment.