mirror of
https://github.com/LBRYFoundation/lbry.com.git
synced 2025-09-03 02:35:11 +00:00
dont send ip if lbry.io email
This commit is contained in:
parent
a374b311d6
commit
00a1a5f2d3
1 changed files with 5 additions and 2 deletions
|
@ -60,12 +60,15 @@ class Prefinery
|
|||
$user = static::findUser($email);
|
||||
if (!$user)
|
||||
{
|
||||
// dont record ip for lbry.io addresses, for testing
|
||||
$ip = isset($_SERVER['REMOTE_ADDR']) && !preg_match('/@lbry\.io$/', $email) ? $_SERVER['REMOTE_ADDR'] : null;
|
||||
$ua = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : null;
|
||||
$user = Prefinery::createTester(array_filter([
|
||||
'email' => $email,
|
||||
'status' => $inviteCode ? static::STATE_ACTIVE : static::STATE_APPLIED, # yes, has to be ACTIVE to validate invite code
|
||||
'invitation_code' => $inviteCode,
|
||||
'referrer_id' => $referrerId,
|
||||
'profile' => ['ip' => $_SERVER['REMOTE_ADDR'], 'user_agent' => $_SERVER['HTTP_USER_AGENT']]
|
||||
'profile' => ['ip' => $ip, 'user_agent' => $ua]
|
||||
]));
|
||||
}
|
||||
|
||||
|
@ -128,4 +131,4 @@ class Prefinery
|
|||
|
||||
class PrefineryException extends Exception
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue