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
This commit is contained in:
parent
e99e349c0b
commit
be87a12f21
@ -16,15 +16,15 @@ return Application::configure(basePath: dirname(__DIR__))
|
||||
)
|
||||
->withMiddleware(function (Middleware $middleware) {
|
||||
$middleware->appendToGroup('web', [
|
||||
ApplicationSession::class,
|
||||
SwapinAuthUser::class,
|
||||
ApplicationSession::class,
|
||||
CheckUpdate::class,
|
||||
]);
|
||||
|
||||
$middleware->prependToGroup('api', [
|
||||
EncryptCookies::class,
|
||||
ApplicationSession::class,
|
||||
SwapinAuthUser::class,
|
||||
ApplicationSession::class,
|
||||
AllowAnonymous::class,
|
||||
]);
|
||||
|
||||
|
@ -124,7 +124,7 @@
|
||||
--}}
|
||||
<div class="widget-content-left header-user-info ms-3">
|
||||
<div class="widget-heading">
|
||||
{{ $user->exists ? Arr::get($user->getAttribute('cn'),0,'Anonymous') : 'Anonymous' }}
|
||||
{{ $user->exists ? Arr::get($user->getAttribute('cn'),0,Arr::get($user->getAttribute('entryuuid'),0,'Secret Person')) : 'Anonymous' }}
|
||||
</div>
|
||||
<div class="widget-subheading">
|
||||
{{ $user->exists ? Arr::get($user->getAttribute('mail'),0,'') : '' }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user