Skip to content

Commit

Permalink
Add remote addr and user agent
Browse files Browse the repository at this point in the history
  • Loading branch information
dnmvisser committed Nov 30, 2022
1 parent af337dd commit cd375cd
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/AccountLinker/Store/SQLStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -393,17 +393,23 @@ public function saveSpEntityId()
user_id,
account_id,
spentityid,
idp_entityid
idp_entityid,
ip_addr,
user_agent
) VALUES (
:user_id,
:account_id,
:spentityid,
:idp_entityid)");
:idp_entityid,
:ip_addr,
:user_agent)");
$stmt->execute(array(
':user_id' => $userId,
':idp_entityid' => $this->getEntityId(),
':account_id' => $this->_getAccountId(),
':spentityid' => $this->_spEntityId
':spentityid' => $this->_spEntityId,
':ip_addr' => $_SERVER['REMOTE_ADDR'] ?? '::1',
':user_agent' => $_SERVER['HTTP_USER_AGENT'] ?? ''
));

SimpleSAML_Logger::stats('AccountLinker: Returning user_id '.$userId);
Expand Down

0 comments on commit cd375cd

Please sign in to comment.