Revision: 2254
Author: olavmrk
Date: Tue Apr 20 04:59:40 2010
Log: core:StatisticsWithAttribute: Make it possible to override the
entityID that is logged.
This change makes it possible to make a group of SPs log as the same SP.
http://code.google.com/p/simplesamlphp/source/detail?r=2254
Modified:
/trunk/modules/core/lib/Auth/Process/StatisticsWithAttribute.php
=======================================
--- /trunk/modules/core/lib/Auth/Process/StatisticsWithAttribute.php Wed
Mar 18 00:44:23 2009
+++ /trunk/modules/core/lib/Auth/Process/StatisticsWithAttribute.php Tue
Apr 20 04:59:40 2010
@@ -59,8 +59,21 @@
$dest = 'NA';
if (array_key_exists($this->attribute, $state['Attributes']))
$logAttribute = $state['Attributes'][$this->attribute][0];
- if (array_key_exists('Source', $state)) $source =
$state['Source']['entityid'];
- if (array_key_exists('Destination', $state)) $dest =
$state['Destination']['entityid'];
+ if (array_key_exists('Source', $state)) {
+ if (isset($state['Source']['core:statistics-id'])) {
+ $source =
$state['Source']['core:statistics-id'];
+ } else {
+ $source = $state['Source']['entityid'];
+ }
+ }
+
+ if (array_key_exists('Destination', $state)) {
+ if (isset($state['Destination']['core:statistics-id']))
{
+ $dest =
$state['Destination']['core:statistics-id'];
+ } else {
+ $dest = $state['Destination']['entityid'];
+ }
+ }
if (!array_key_exists('PreviousSSOTimestamp', $state)) {
/* The user hasn't authenticated with this SP earlier in this session.
*/
--
You received this message because you are subscribed to the Google Groups
"simpleSAMLphp commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/simplesamlphp-commits?hl=en.