@@ -70,12 +70,12 @@ discard block |
||
70 | 70 | $attributeSet = $state['consent:store.attributeSet']; |
71 | 71 | |
72 | 72 | \SimpleSAML\Logger::debug( |
73 | - 'Consent - saveConsent() : [' . $userId . '|' . $targetedId . '|' . $attributeSet . ']' |
|
73 | + 'Consent - saveConsent() : ['.$userId.'|'.$targetedId.'|'.$attributeSet.']' |
|
74 | 74 | ); |
75 | 75 | try { |
76 | 76 | $store->saveConsent($userId, $targetedId, $attributeSet); |
77 | 77 | } catch (\Exception $e) { |
78 | - \SimpleSAML\Logger::error('Consent: Error writing to storage: ' . $e->getMessage()); |
|
78 | + \SimpleSAML\Logger::error('Consent: Error writing to storage: '.$e->getMessage()); |
|
79 | 79 | } |
80 | 80 | } |
81 | 81 | |
@@ -226,38 +226,38 @@ discard block |
||
226 | 226 | |
227 | 227 | $alternate = ['odd', 'even']; |
228 | 228 | $i = 0; |
229 | - $summary = 'summary="' . $translator->t('{consent:consent:table_summary}') . '"'; |
|
229 | + $summary = 'summary="'.$translator->t('{consent:consent:table_summary}').'"'; |
|
230 | 230 | |
231 | 231 | if (strlen($nameParent) > 0) { |
232 | - $parentStr = strtolower($nameParent) . '_'; |
|
233 | - $str = '<table class="attributes" ' . $summary . '>'; |
|
232 | + $parentStr = strtolower($nameParent).'_'; |
|
233 | + $str = '<table class="attributes" '.$summary.'>'; |
|
234 | 234 | } else { |
235 | 235 | $parentStr = ''; |
236 | - $str = '<table id="table_with_attributes" class="attributes" ' . $summary . '>'; |
|
237 | - $str .= "\n" . '<caption>'.$translator->t('{consent:consent:table_caption}') . '</caption>'; |
|
236 | + $str = '<table id="table_with_attributes" class="attributes" '.$summary.'>'; |
|
237 | + $str .= "\n".'<caption>'.$translator->t('{consent:consent:table_caption}').'</caption>'; |
|
238 | 238 | } |
239 | 239 | |
240 | 240 | foreach ($attributes as $name => $value) { |
241 | 241 | $nameraw = $name; |
242 | - $name = $translator->getAttributeTranslation($parentStr . $nameraw); |
|
242 | + $name = $translator->getAttributeTranslation($parentStr.$nameraw); |
|
243 | 243 | |
244 | 244 | if (preg_match('/^child_/', $nameraw)) { |
245 | 245 | // insert child table |
246 | 246 | $parentName = preg_replace('/^child_/', '', $nameraw); |
247 | 247 | foreach ($value as $child) { |
248 | - $str .= "\n" . '<tr class="odd"><td class="td_odd">' . |
|
249 | - present_attributes($t, $child, $parentName) . '</td></tr>'; |
|
248 | + $str .= "\n".'<tr class="odd"><td class="td_odd">'. |
|
249 | + present_attributes($t, $child, $parentName).'</td></tr>'; |
|
250 | 250 | } |
251 | 251 | } else { |
252 | 252 | // insert values directly |
253 | 253 | |
254 | - $str .= "\n" . '<tr class="' . $alternate[($i++ % 2)] . |
|
255 | - '"><td><span class="attrname">' . htmlspecialchars($name) . '</span></td>'; |
|
254 | + $str .= "\n".'<tr class="'.$alternate[($i++ % 2)]. |
|
255 | + '"><td><span class="attrname">'.htmlspecialchars($name).'</span></td>'; |
|
256 | 256 | |
257 | 257 | $isHidden = in_array($nameraw, $t->data['hiddenAttributes'], true); |
258 | 258 | if ($isHidden) { |
259 | 259 | $hiddenId = \SimpleSAML\Utils\Random::generateID(); |
260 | - $str .= '<td><span class="attrvalue hidden" id="hidden_' . $hiddenId . '">'; |
|
260 | + $str .= '<td><span class="attrvalue hidden" id="hidden_'.$hiddenId.'">'; |
|
261 | 261 | } else { |
262 | 262 | $hiddenId = ''; |
263 | 263 | $str .= '<td><span class="attrvalue">'; |
@@ -268,18 +268,18 @@ discard block |
||
268 | 268 | $str .= '<ul>'; |
269 | 269 | foreach ($value as $listitem) { |
270 | 270 | if ($nameraw === 'jpegPhoto') { |
271 | - $str .= '<li><img src="data:image/jpeg;base64,' . |
|
272 | - htmlspecialchars($listitem) . '" alt="User photo" /></li>'; |
|
271 | + $str .= '<li><img src="data:image/jpeg;base64,'. |
|
272 | + htmlspecialchars($listitem).'" alt="User photo" /></li>'; |
|
273 | 273 | } else { |
274 | - $str .= '<li>' . htmlspecialchars($listitem) . '</li>'; |
|
274 | + $str .= '<li>'.htmlspecialchars($listitem).'</li>'; |
|
275 | 275 | } |
276 | 276 | } |
277 | 277 | $str .= '</ul>'; |
278 | 278 | } elseif (isset($value[0])) { |
279 | 279 | // we hawe only one value |
280 | 280 | if ($nameraw === 'jpegPhoto') { |
281 | - $str .= '<img src="data:image/jpeg;base64,' . |
|
282 | - htmlspecialchars($value[0]) . '" alt="User photo" />'; |
|
281 | + $str .= '<img src="data:image/jpeg;base64,'. |
|
282 | + htmlspecialchars($value[0]).'" alt="User photo" />'; |
|
283 | 283 | } else { |
284 | 284 | $str .= htmlspecialchars($value[0]); |
285 | 285 | } |
@@ -287,10 +287,10 @@ discard block |
||
287 | 287 | $str .= '</span>'; |
288 | 288 | |
289 | 289 | if ($isHidden) { |
290 | - $str .= '<div class="attrvalue consent_showattribute" id="visible_' . $hiddenId . '">'; |
|
290 | + $str .= '<div class="attrvalue consent_showattribute" id="visible_'.$hiddenId.'">'; |
|
291 | 291 | $str .= '... '; |
292 | - $str .= '<a class="consent_showattributelink" href="javascript:SimpleSAML_show(\'hidden_' . $hiddenId; |
|
293 | - $str .= '\'); SimpleSAML_hide(\'visible_' . $hiddenId . '\');">'; |
|
292 | + $str .= '<a class="consent_showattributelink" href="javascript:SimpleSAML_show(\'hidden_'.$hiddenId; |
|
293 | + $str .= '\'); SimpleSAML_hide(\'visible_'.$hiddenId.'\');">'; |
|
294 | 294 | $str .= $translator->t('{consent:consent:show_attribute}'); |
295 | 295 | $str .= '</a>'; |
296 | 296 | $str .= '</div>'; |
@@ -42,19 +42,19 @@ discard block |
||
42 | 42 | { |
43 | 43 | $cookieName = self::getCookieName($userId, $destinationId); |
44 | 44 | |
45 | - $data = $userId . ':' . $attributeSet . ':' . $destinationId; |
|
45 | + $data = $userId.':'.$attributeSet.':'.$destinationId; |
|
46 | 46 | |
47 | - \SimpleSAML\Logger::debug('Consent cookie - Get [' . $data . ']'); |
|
47 | + \SimpleSAML\Logger::debug('Consent cookie - Get ['.$data.']'); |
|
48 | 48 | |
49 | 49 | if (!array_key_exists($cookieName, $_COOKIE)) { |
50 | 50 | \SimpleSAML\Logger::debug( |
51 | - 'Consent cookie - no cookie with name \'' . $cookieName . '\'.' |
|
51 | + 'Consent cookie - no cookie with name \''.$cookieName.'\'.' |
|
52 | 52 | ); |
53 | 53 | return false; |
54 | 54 | } |
55 | 55 | if (!is_string($_COOKIE[$cookieName])) { |
56 | 56 | \SimpleSAML\Logger::warning( |
57 | - 'Value of consent cookie wasn\'t a string. Was: ' . |
|
57 | + 'Value of consent cookie wasn\'t a string. Was: '. |
|
58 | 58 | var_export($_COOKIE[$cookieName], true) |
59 | 59 | ); |
60 | 60 | return false; |
@@ -92,9 +92,9 @@ discard block |
||
92 | 92 | public function saveConsent(string $userId, string $destinationId, string $attributeSet) |
93 | 93 | { |
94 | 94 | $name = self::getCookieName($userId, $destinationId); |
95 | - $value = $userId . ':' . $attributeSet . ':' . $destinationId; |
|
95 | + $value = $userId.':'.$attributeSet.':'.$destinationId; |
|
96 | 96 | |
97 | - \SimpleSAML\Logger::debug('Consent cookie - Set [' . $value . ']'); |
|
97 | + \SimpleSAML\Logger::debug('Consent cookie - Set ['.$value.']'); |
|
98 | 98 | |
99 | 99 | $value = self::sign($value); |
100 | 100 | return $this->setConsentCookie($name, $value); |
@@ -164,7 +164,7 @@ discard block |
||
164 | 164 | $tmp = explode(':', $value, 3); |
165 | 165 | if (count($tmp) !== 3) { |
166 | 166 | \SimpleSAML\Logger::warning( |
167 | - 'Consent cookie with invalid value: ' . $value |
|
167 | + 'Consent cookie with invalid value: '.$value |
|
168 | 168 | ); |
169 | 169 | continue; |
170 | 170 | } |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | { |
196 | 196 | $secretSalt = \SimpleSAML\Utils\Config::getSecretSalt(); |
197 | 197 | |
198 | - return sha1($secretSalt.$data.$secretSalt) . ':' . $data; |
|
198 | + return sha1($secretSalt.$data.$secretSalt).':'.$data; |
|
199 | 199 | } |
200 | 200 | |
201 | 201 |
@@ -169,8 +169,8 @@ discard block |
||
169 | 169 | public function hasConsent(string $userId, string $destinationId, string $attributeSet) |
170 | 170 | { |
171 | 171 | $st = $this->execute( |
172 | - 'UPDATE ' . $this->table . ' ' . |
|
173 | - 'SET usage_date = ' . $this->dateTime . ' ' . |
|
172 | + 'UPDATE '.$this->table.' '. |
|
173 | + 'SET usage_date = '.$this->dateTime.' '. |
|
174 | 174 | 'WHERE hashed_user_id = ? AND service_id = ? AND attribute = ?', |
175 | 175 | [$userId, $destinationId, $attributeSet] |
176 | 176 | ); |
@@ -206,8 +206,8 @@ discard block |
||
206 | 206 | { |
207 | 207 | // Check for old consent (with different attribute set) |
208 | 208 | $st = $this->execute( |
209 | - 'UPDATE ' . $this->table . ' ' . |
|
210 | - 'SET consent_date = ' . $this->dateTime . ', usage_date = ' . $this->dateTime . ', attribute = ? ' . |
|
209 | + 'UPDATE '.$this->table.' '. |
|
210 | + 'SET consent_date = '.$this->dateTime.', usage_date = '.$this->dateTime.', attribute = ? '. |
|
211 | 211 | 'WHERE hashed_user_id = ? AND service_id = ?', |
212 | 212 | [$attributeSet, $userId, $destinationId] |
213 | 213 | ); |
@@ -224,8 +224,8 @@ discard block |
||
224 | 224 | |
225 | 225 | // Add new consent |
226 | 226 | $st = $this->execute( |
227 | - 'INSERT INTO ' . $this->table . ' (' . 'consent_date, usage_date, hashed_user_id, service_id, attribute' . |
|
228 | - ') ' . 'VALUES (' . $this->dateTime . ', ' . $this->dateTime . ', ?, ?, ?)', |
|
227 | + 'INSERT INTO '.$this->table.' ('.'consent_date, usage_date, hashed_user_id, service_id, attribute'. |
|
228 | + ') '.'VALUES ('.$this->dateTime.', '.$this->dateTime.', ?, ?, ?)', |
|
229 | 229 | [$userId, $destinationId, $attributeSet] |
230 | 230 | ); |
231 | 231 | |
@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | public function deleteConsent(string $userId, string $destinationId) |
250 | 250 | { |
251 | 251 | $st = $this->execute( |
252 | - 'DELETE FROM ' . $this->table . ' WHERE hashed_user_id = ? AND service_id = ?;', |
|
252 | + 'DELETE FROM '.$this->table.' WHERE hashed_user_id = ? AND service_id = ?;', |
|
253 | 253 | [$userId, $destinationId] |
254 | 254 | ); |
255 | 255 | |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | public function deleteAllConsents(string $userId) |
278 | 278 | { |
279 | 279 | $st = $this->execute( |
280 | - 'DELETE FROM ' . $this->table . ' WHERE hashed_user_id = ?', |
|
280 | + 'DELETE FROM '.$this->table.' WHERE hashed_user_id = ?', |
|
281 | 281 | [$userId] |
282 | 282 | ); |
283 | 283 | |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | } |
287 | 287 | |
288 | 288 | if ($st->rowCount() > 0) { |
289 | - \SimpleSAML\Logger::debug('consent:Database - Deleted (' . $st->rowCount() . ') consent(s) . '); |
|
289 | + \SimpleSAML\Logger::debug('consent:Database - Deleted ('.$st->rowCount().') consent(s) . '); |
|
290 | 290 | return $st->rowCount(); |
291 | 291 | } |
292 | 292 | |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | $ret = []; |
310 | 310 | |
311 | 311 | $st = $this->execute( |
312 | - 'SELECT service_id, attribute, consent_date, usage_date FROM ' . $this->table . |
|
312 | + 'SELECT service_id, attribute, consent_date, usage_date FROM '.$this->table. |
|
313 | 313 | ' WHERE hashed_user_id = ?', |
314 | 314 | [$userId] |
315 | 315 | ); |
@@ -348,16 +348,16 @@ discard block |
||
348 | 348 | $st = $db->prepare($statement); |
349 | 349 | if ($st === false) { |
350 | 350 | \SimpleSAML\Logger::error( |
351 | - 'consent:Database - Error preparing statement \'' . |
|
352 | - $statement . '\': ' . self::formatError($db->errorInfo()) |
|
351 | + 'consent:Database - Error preparing statement \''. |
|
352 | + $statement.'\': '.self::formatError($db->errorInfo()) |
|
353 | 353 | ); |
354 | 354 | return false; |
355 | 355 | } |
356 | 356 | |
357 | 357 | if ($st->execute($parameters) !== true) { |
358 | 358 | \SimpleSAML\Logger::error( |
359 | - 'consent:Database - Error executing statement \'' . |
|
360 | - $statement . '\': ' . self::formatError($st->errorInfo()) |
|
359 | + 'consent:Database - Error executing statement \''. |
|
360 | + $statement.'\': '.self::formatError($st->errorInfo()) |
|
361 | 361 | ); |
362 | 362 | return false; |
363 | 363 | } |
@@ -381,7 +381,7 @@ discard block |
||
381 | 381 | $ret = []; |
382 | 382 | |
383 | 383 | // Get total number of consents |
384 | - $st = $this->execute('SELECT COUNT(*) AS no FROM ' . $this->table, []); |
|
384 | + $st = $this->execute('SELECT COUNT(*) AS no FROM '.$this->table, []); |
|
385 | 385 | |
386 | 386 | if ($st === false) { |
387 | 387 | return []; |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | // Get total number of users that has given consent |
395 | 395 | $st = $this->execute( |
396 | 396 | 'SELECT COUNT(*) AS no '. |
397 | - 'FROM (SELECT DISTINCT hashed_user_id FROM ' . $this->table . ' ) AS foo', |
|
397 | + 'FROM (SELECT DISTINCT hashed_user_id FROM '.$this->table.' ) AS foo', |
|
398 | 398 | [] |
399 | 399 | ); |
400 | 400 | |
@@ -408,7 +408,7 @@ discard block |
||
408 | 408 | |
409 | 409 | // Get total number of services that has been given consent to |
410 | 410 | $st = $this->execute( |
411 | - 'SELECT COUNT(*) AS no FROM (SELECT DISTINCT service_id FROM ' . $this->table . ') AS foo', |
|
411 | + 'SELECT COUNT(*) AS no FROM (SELECT DISTINCT service_id FROM '.$this->table.') AS foo', |
|
412 | 412 | [] |
413 | 413 | ); |
414 | 414 | |
@@ -464,7 +464,7 @@ discard block |
||
464 | 464 | { |
465 | 465 | Assert::greaterThanEq(count($error), 3); |
466 | 466 | |
467 | - return $error[0] . ' - ' . $error[2] . ' (' . $error[1] . ')'; |
|
467 | + return $error[0].' - '.$error[2].' ('.$error[1].')'; |
|
468 | 468 | } |
469 | 469 | |
470 | 470 | |
@@ -476,7 +476,7 @@ discard block |
||
476 | 476 | public function selftest() |
477 | 477 | { |
478 | 478 | $st = $this->execute( |
479 | - 'SELECT * FROM ' . $this->table . ' WHERE hashed_user_id = ? AND service_id = ? AND attribute = ?', |
|
479 | + 'SELECT * FROM '.$this->table.' WHERE hashed_user_id = ? AND service_id = ? AND attribute = ?', |
|
480 | 480 | ['test', 'test', 'test'] |
481 | 481 | ); |
482 | 482 |
@@ -129,7 +129,7 @@ |
||
129 | 129 | } |
130 | 130 | |
131 | 131 | if (!is_array($config)) { |
132 | - throw new \Exception('Invalid configuration for consent store option: ' . var_export($config, true)); |
|
132 | + throw new \Exception('Invalid configuration for consent store option: '.var_export($config, true)); |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | if (!array_key_exists(0, $config)) { |
@@ -88,8 +88,8 @@ discard block |
||
88 | 88 | if (array_key_exists('includeValues', $config)) { |
89 | 89 | if (!is_bool($config['includeValues'])) { |
90 | 90 | throw new \SimpleSAML\Error\Exception( |
91 | - 'Consent: includeValues must be boolean. ' . |
|
92 | - var_export($config['includeValues'], true) . ' given.' |
|
91 | + 'Consent: includeValues must be boolean. '. |
|
92 | + var_export($config['includeValues'], true).' given.' |
|
93 | 93 | ); |
94 | 94 | } |
95 | 95 | $this->includeValues = $config['includeValues']; |
@@ -98,8 +98,8 @@ discard block |
||
98 | 98 | if (array_key_exists('checked', $config)) { |
99 | 99 | if (!is_bool($config['checked'])) { |
100 | 100 | throw new \SimpleSAML\Error\Exception( |
101 | - 'Consent: checked must be boolean. ' . |
|
102 | - var_export($config['checked'], true) . ' given.' |
|
101 | + 'Consent: checked must be boolean. '. |
|
102 | + var_export($config['checked'], true).' given.' |
|
103 | 103 | ); |
104 | 104 | } |
105 | 105 | $this->checked = $config['checked']; |
@@ -108,8 +108,8 @@ discard block |
||
108 | 108 | if (array_key_exists('focus', $config)) { |
109 | 109 | if (!in_array($config['focus'], ['yes', 'no'], true)) { |
110 | 110 | throw new \SimpleSAML\Error\Exception( |
111 | - 'Consent: focus must be a string with values `yes` or `no`. ' . |
|
112 | - var_export($config['focus'], true) . ' given.' |
|
111 | + 'Consent: focus must be a string with values `yes` or `no`. '. |
|
112 | + var_export($config['focus'], true).' given.' |
|
113 | 113 | ); |
114 | 114 | } |
115 | 115 | $this->focus = $config['focus']; |
@@ -118,8 +118,8 @@ discard block |
||
118 | 118 | if (array_key_exists('hiddenAttributes', $config)) { |
119 | 119 | if (!is_array($config['hiddenAttributes'])) { |
120 | 120 | throw new \SimpleSAML\Error\Exception( |
121 | - 'Consent: hiddenAttributes must be an array. ' . |
|
122 | - var_export($config['hiddenAttributes'], true) . ' given.' |
|
121 | + 'Consent: hiddenAttributes must be an array. '. |
|
122 | + var_export($config['hiddenAttributes'], true).' given.' |
|
123 | 123 | ); |
124 | 124 | } |
125 | 125 | $this->hiddenAttributes = $config['hiddenAttributes']; |
@@ -128,8 +128,8 @@ discard block |
||
128 | 128 | if (array_key_exists('attributes.exclude', $config)) { |
129 | 129 | if (!is_array($config['attributes.exclude'])) { |
130 | 130 | throw new \SimpleSAML\Error\Exception( |
131 | - 'Consent: attributes.exclude must be an array. ' . |
|
132 | - var_export($config['attributes.exclude'], true) . ' given.' |
|
131 | + 'Consent: attributes.exclude must be an array. '. |
|
132 | + var_export($config['attributes.exclude'], true).' given.' |
|
133 | 133 | ); |
134 | 134 | } |
135 | 135 | $this->noconsentattributes = $config['attributes.exclude']; |
@@ -137,8 +137,8 @@ discard block |
||
137 | 137 | Logger::warning("The 'noconsentattributes' option has been deprecated in favour of 'attributes.exclude'."); |
138 | 138 | if (!is_array($config['noconsentattributes'])) { |
139 | 139 | throw new \SimpleSAML\Error\Exception( |
140 | - 'Consent: noconsentattributes must be an array. ' . |
|
141 | - var_export($config['noconsentattributes'], true) . ' given.' |
|
140 | + 'Consent: noconsentattributes must be an array. '. |
|
141 | + var_export($config['noconsentattributes'], true).' given.' |
|
142 | 142 | ); |
143 | 143 | } |
144 | 144 | $this->noconsentattributes = $config['noconsentattributes']; |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | $this->store = \SimpleSAML\Module\consent\Store::parseStoreConfig($config['store']); |
150 | 150 | } catch (\Exception $e) { |
151 | 151 | Logger::error( |
152 | - 'Consent: Could not create consent storage: ' . |
|
152 | + 'Consent: Could not create consent storage: '. |
|
153 | 153 | $e->getMessage() |
154 | 154 | ); |
155 | 155 | } |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | isset($state['Source']['consent.disable']) && |
269 | 269 | self::checkDisable($state['Source']['consent.disable'], $spEntityId) |
270 | 270 | ) { |
271 | - Logger::debug('Consent: Consent disabled for entity ' . $spEntityId . ' with IdP ' . $idpEntityId); |
|
271 | + Logger::debug('Consent: Consent disabled for entity '.$spEntityId.' with IdP '.$idpEntityId); |
|
272 | 272 | Stats::log('consent:disabled', $statsData); |
273 | 273 | return; |
274 | 274 | } |
@@ -276,14 +276,14 @@ discard block |
||
276 | 276 | isset($state['Destination']['consent.disable']) && |
277 | 277 | self::checkDisable($state['Destination']['consent.disable'], $idpEntityId) |
278 | 278 | ) { |
279 | - Logger::debug('Consent: Consent disabled for entity ' . $spEntityId . ' with IdP ' . $idpEntityId); |
|
279 | + Logger::debug('Consent: Consent disabled for entity '.$spEntityId.' with IdP '.$idpEntityId); |
|
280 | 280 | Stats::log('consent:disabled', $statsData); |
281 | 281 | return; |
282 | 282 | } |
283 | 283 | |
284 | 284 | if ($this->store !== null) { |
285 | - $source = $state['Source']['metadata-set'] . '|' . $idpEntityId; |
|
286 | - $destination = $state['Destination']['metadata-set'] . '|' . $spEntityId; |
|
285 | + $source = $state['Source']['metadata-set'].'|'.$idpEntityId; |
|
286 | + $destination = $state['Destination']['metadata-set'].'|'.$spEntityId; |
|
287 | 287 | $attributes = $state['Attributes']; |
288 | 288 | |
289 | 289 | // Remove attributes that do not require consent |
@@ -293,16 +293,16 @@ discard block |
||
293 | 293 | } |
294 | 294 | } |
295 | 295 | |
296 | - Logger::debug('Consent: userid: ' . $state['UserID']); |
|
297 | - Logger::debug('Consent: source: ' . $source); |
|
298 | - Logger::debug('Consent: destination: ' . $destination); |
|
296 | + Logger::debug('Consent: userid: '.$state['UserID']); |
|
297 | + Logger::debug('Consent: source: '.$source); |
|
298 | + Logger::debug('Consent: destination: '.$destination); |
|
299 | 299 | |
300 | 300 | $userId = self::getHashedUserID($state['UserID'], $source); |
301 | 301 | $targetedId = self::getTargetedID($state['UserID'], $source, $destination); |
302 | 302 | $attributeSet = self::getAttributeHash($attributes, $this->includeValues); |
303 | 303 | |
304 | 304 | Logger::debug( |
305 | - 'Consent: hasConsent() [' . $userId . '|' . $targetedId . '|' . $attributeSet . ']' |
|
305 | + 'Consent: hasConsent() ['.$userId.'|'.$targetedId.'|'.$attributeSet.']' |
|
306 | 306 | ); |
307 | 307 | |
308 | 308 | try { |
@@ -321,7 +321,7 @@ discard block |
||
321 | 321 | $state['consent:store.destination'] = $targetedId; |
322 | 322 | $state['consent:store.attributeSet'] = $attributeSet; |
323 | 323 | } catch (\Exception $e) { |
324 | - Logger::error('Consent: Error reading from storage: ' . $e->getMessage()); |
|
324 | + Logger::error('Consent: Error reading from storage: '.$e->getMessage()); |
|
325 | 325 | Logger::stats('Consent failed'); |
326 | 326 | Stats::log('consent:failed', $statsData); |
327 | 327 | } |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | */ |
363 | 363 | public static function getHashedUserID($userid, $source) |
364 | 364 | { |
365 | - return hash('sha1', $userid . '|' . Utils\Config::getSecretSalt() . '|' . $source); |
|
365 | + return hash('sha1', $userid.'|'.Utils\Config::getSecretSalt().'|'.$source); |
|
366 | 366 | } |
367 | 367 | |
368 | 368 | |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | */ |
378 | 378 | public static function getTargetedID($userid, $source, $destination) |
379 | 379 | { |
380 | - return hash('sha1', $userid . '|' . Utils\Config::getSecretSalt() . '|' . $source . '|' . $destination); |
|
380 | + return hash('sha1', $userid.'|'.Utils\Config::getSecretSalt().'|'.$source.'|'.$destination); |
|
381 | 381 | } |
382 | 382 | |
383 | 383 |