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

Commit 91f7cb8

Browse files
Merge pull request #186 from dBucik/fix_go_to_reg
fix: 🐛 Add check of key existence in template - unauth-acc-reg
2 parents 5be416f + 34c10d5 commit 91f7cb8

1 file changed

Lines changed: 12 additions & 15 deletions

File tree

templates/unauthorized-access-go-to-registration-tpl.php

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
use SimpleSAML\XHTML\Template;
66

77
/**
8-
* Template for inform user that he/she will be redirected to registration
9-
*
10-
* Allow type hinting in IDE
8+
* Template displaying information user that user will be redirected to registration page
119
*
1210
* @var Template $this
1311
*/
@@ -16,22 +14,22 @@
1614
$this->data['head'] = '<link rel="stylesheet" media="screen" type="text/css" href="' .
1715
Module::getModuleUrl('perun/res/css/perun_identity_go_to_registration.css') . '" />';
1816

17+
$params = $this->data['params'];
18+
if (isset($_POST['continueToRegistration'])) {
19+
HTTP::redirectTrustedURL($_REQUEST['registerUrL'], $params);
20+
}
1921
$spMetadata = $this->data['SPMetadata'];
22+
2023
$serviceName = '';
21-
$informationURL = '';
22-
$params = $this->data['params'];
23-
if ($spMetadata['name']['en']) {
24+
if (isset($spMetadata['name']['en'])) {
2425
$serviceName = $spMetadata['name']['en'];
2526
}
2627

27-
if ($spMetadata['InformationURL']['en']) {
28+
$informationURL = '';
29+
if (isset($spMetadata['InformationURL']['en'])) {
2830
$informationURL = $spMetadata['InformationURL']['en'];
2931
}
3032

31-
if (isset($_POST['continueToRegistration'])) {
32-
HTTP::redirectTrustedURL($_REQUEST['registerUrL'], $params);
33-
}
34-
3533
$this->includeAtTemplateBase('includes/header.php');
3634

3735
$header = $this->t('{perun:perun:go-to-registration_header1}');
@@ -49,13 +47,12 @@
4947
?>
5048

5149
<form method="post">
52-
</hr>
53-
</br>
50+
<hr/>
51+
<br/>
5452
<input type="submit" name="continueToRegistration"
5553
value="<?php echo $this->t('{perun:perun:go-to-registration_continue}') ?>"
5654
class="btn btn-lg btn-primary btn-block">
57-
<div class="form-group">
58-
</div>
55+
<div class="form-group"></div>
5956
</form>
6057

6158
<?php

0 commit comments

Comments
 (0)