]> BookStack Code Mirror - bookstack/blobdiff - app/helpers.php
Fixed entities wrongly visible on 404
[bookstack] / app / helpers.php
index 6decb08e96517233086eb9fe2e76ad002ce892fa..e68e29d132a80af4caec8084bd642e59ca6395f6 100644 (file)
@@ -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