<p>
<?php
- echo $this->t('{fsfdrupalauth:fsfdrupalauth:loggedin_as_description}') . "...";
+ $casconfig = SimpleSAML_Configuration::getConfig('module_casserver.php');
+
+ $auth = new SimpleSAML\Auth\Simple($casconfig->getValue('authsource'));
+ $attrs = $auth->getAttributes();
+
+ if (!isset($attrs['name'][0])) {
+ throw new Exception('fsfdrupalauth: "name" attribute missing.');
+ }
+
+ echo $this->t('{fsfdrupalauth:fsfdrupalauth:loggedin_as_description}') . "<strong>" . htmlspecialchars($attrs['name'][0]) . "</strong>.";
?>
</p>