Updated user references to be app-default-supporting functions

This commit is contained in:
Dan Brown 2019-04-14 13:19:33 +01:00
parent 9406b4d4c9
commit ee58bea8b7
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
2 changed files with 2 additions and 2 deletions

View File

@ -75,7 +75,7 @@ class SettingService
*/
public function getForCurrentUser($key, $default = false)
{
return $this->getUser(auth()->user(), $key, $default);
return $this->getUser(user(), $key, $default);
}
/**

View File

@ -4,7 +4,7 @@ $key - Unique key for checking existing stored state.
--}}
<?php $isOpen = setting()->getForCurrentUser('section_expansion#'. $key); ?>
<a expand-toggle="{{ $target }}"
expand-toggle-update-endpoint="{{ baseUrl('/settings/users/'. auth()->user()->id .'/update-expansion-preference/' . $key) }}"
expand-toggle-update-endpoint="{{ baseUrl('/settings/users/'. $currentUser->id .'/update-expansion-preference/' . $key) }}"
expand-toggle-is-open="{{ $isOpen ? 'yes' : 'no' }}"
class="text-muted icon-list-item text-primary">
<span>@icon('expand-text')</span>