]> BookStack Code Mirror - bookstack/blobdiff - app/helpers.php
#47 - Fixes the issues with the test case.
[bookstack] / app / helpers.php
index f69f2c174c3ec08ee1ad4107518a5e3f6007cd63..153f1e49fcc0a572dd5463e38c9cc4bc572c9332 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