Skip to content

Commit

Permalink
max distance penalty @ 50
Browse files Browse the repository at this point in the history
  • Loading branch information
detain committed Feb 1, 2018
1 parent 6cc829d commit 0bce768
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/maxmind.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ function update_maxmind($customer, $module = 'default', $ip = false) {
*/

$distance_penalty = floor($response['distance'] / 100);
$distance_penalty = $distance_penalty > 50 ? 50 : $distance_penalty;
myadmin_log('maxmind', 'info', 'Distance is '.$response['distance'].' or +'.$distance_penalty.' to riskScore (previously '.$response['riskScore'].')', __LINE__, __FILE__);
$response['riskScore'] += $distance_penalty;

Expand Down

0 comments on commit 0bce768

Please sign in to comment.