X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/65899a3e91911d7e7199eae8e33cb5f4fa6ce929..refs/pull/474/head:/app/helpers.php diff --git a/app/helpers.php b/app/helpers.php index f69f2c174..153f1e49f 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -37,6 +37,15 @@ function user() return auth()->user() ?: \BookStack\User::getDefault(); } +/** + * Check if current user is a signed in user. + * @return bool + */ +function signedInUser() +{ + return auth()->user() && !auth()->user()->isDefault(); +} + /** * Check if the current user has a permission. * If an ownable element is passed in the jointPermissions are checked against