fix: [notice] errors when not logged in removed

cli-modification-summary
iglocska 2022-08-24 14:47:40 +02:00
parent fac19e0a3c
commit 3857de8499
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 2 additions and 1 deletions

View File

@ -25,7 +25,7 @@ class UsersNavigation extends BaseNavigation
$bcf = $this->bcf;
$request = $this->request;
$passedData = $this->request->getParam('pass');
$currentUserId = $this->currentUserId;
$currentUserId = empty($this->currentUserId) ? null : $this->currentUserId;
$currentUser = $this->currentUser;
$this->bcf->addLink('Users', 'view', 'UserSettings', 'index', function ($config) use ($bcf, $request, $passedData, $currentUser) {
if (!empty($passedData[0])) {
@ -75,6 +75,7 @@ class UsersNavigation extends BaseNavigation
!empty(Configure::read('keycloak.enabled')) &&
!empty(Configure::read('keycloak.provider.baseUrl')) &&
!empty(Configure::read('keycloak.provider.realm')) &&
!empty($passedData[0]) &&
$currentUserId == $passedData[0]
) {
$url = sprintf(