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

Commit 178442d

Browse files
Merge pull request #26 from BaranekD/bugfix
Fixed the bug where isCesnetEligibleLastSeen was not set if user is empty
2 parents 7db9556 + 927a26d commit 178442d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
All notable changes to this project will be documented in this file.
33

44
## [Unreleased]
5+
#### Fixed
6+
- Fixed the bug where isCesnetEligibleLastSeen was not set if user is empty
7+
58
#### Changed
69
- Warning in disco-tpl modified due to changes in module perun
710
- Removed warning template - it is no longer needed here because it was moved to module perun

lib/Auth/Process/IsCesnetEligible.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,12 @@ public function process(&$request)
141141
);
142142
$this->cesnetEligibleLastSeenValue = $this->cesnetEligibleLastSeenAttribute['value'];
143143
}
144+
}
144145

145-
if ($isHostelVerified || (!empty($this->eduPersonScopedAffiliation) && $this->isCesnetEligible())) {
146-
$this->cesnetEligibleLastSeenValue = date("Y-m-d H:i:s");
146+
if ($isHostelVerified || (!empty($this->eduPersonScopedAffiliation) && $this->isCesnetEligible())) {
147+
$this->cesnetEligibleLastSeenValue = date("Y-m-d H:i:s");
147148

149+
if (!empty($user)) {
148150
if ($this->cesnetEligibleLastSeenAttribute === null) {
149151
$this->cesnetEligibleLastSeenAttribute = $this->rpcConnector->get(
150152
'attributesManager',

0 commit comments

Comments
 (0)