Skip to content

Commit be87a12

Browse files
committed
We need to start the application after we've swapped the user details from the cookie, otherwise $user is initialised by the LDAP_USERNAME credentials - which may not have access to all the attributes
1 parent e99e349 commit be87a12

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bootstrap/app.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616
)
1717
->withMiddleware(function (Middleware $middleware) {
1818
$middleware->appendToGroup('web', [
19-
ApplicationSession::class,
2019
SwapinAuthUser::class,
20+
ApplicationSession::class,
2121
CheckUpdate::class,
2222
]);
2323

2424
$middleware->prependToGroup('api', [
2525
EncryptCookies::class,
26-
ApplicationSession::class,
2726
SwapinAuthUser::class,
27+
ApplicationSession::class,
2828
AllowAnonymous::class,
2929
]);
3030

resources/themes/architect/views/layouts/partials/topmenu.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@
124124
--}}
125125
<div class="widget-content-left header-user-info ms-3">
126126
<div class="widget-heading">
127-
{{ $user->exists ? Arr::get($user->getAttribute('cn'),0,'Anonymous') : 'Anonymous' }}
127+
{{ $user->exists ? Arr::get($user->getAttribute('cn'),0,Arr::get($user->getAttribute('entryuuid'),0,'Secret Person')) : 'Anonymous' }}
128128
</div>
129129
<div class="widget-subheading">
130130
{{ $user->exists ? Arr::get($user->getAttribute('mail'),0,'') : '' }}

0 commit comments

Comments
 (0)