Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit 7fbbaeb

Browse files
committed
Fix missing attribute name translation in force_aup_continue.php
1 parent 4a0462c commit 7fbbaeb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

www/force_aup_continue.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,23 @@
44
use SimpleSAML\Auth\State;
55
use SimpleSAML\Auth\ProcessingChain;
66
use SimpleSAML\Logger;
7+
use SimpleSAML\Module\perun\AttributeUtils;
8+
use SimpleSAML\Module\perun\model\User;
79

810
$id = $_REQUEST['StateId'];
911
$state = State::loadState($id, 'perun:forceAup');
1012
$rpcAdapter = new AdapterRpc();
1113
$rpcConnector = $rpcAdapter->getConnector();
1214
/**
13-
* @var \SimpleSAML\Module\perun\model\User $user
15+
* @var User $user
1416
*/
1517
$user = $state['perun']['user'];
1618

1719
try {
20+
$attrName = AttributeUtils::getRpcAttrName($state['perunUserAupAttr']);
1821
$userAupsAttr = $rpcConnector->get('attributesManager', 'getAttribute', [
1922
'user' => $user->getId(),
20-
'attributeName' => $state['perunUserAupAttr'],
23+
'attributeName' => $attrName,
2124
]);
2225
$userAups = $userAupsAttr['value'];
2326
} catch (\Exception $exception) {

0 commit comments

Comments
 (0)