diff --git a/core/Access.php b/core/Access.php
index <HASH>..<HASH> 100644
--- a/core/Access.php
+++ b/core/Access.php
@@ -727,6 +727,16 @@ class Access
 
         throw new NoAccessException($message);
     }
+
+    /**
+     * Returns true if the current user is logged in or not.
+     *
+     * @return bool
+     */
+    public function isUserLoggedIn()
+    {
+        return !empty($this->login);
+    }
 }
 
 /**
diff --git a/core/FrontController.php b/core/FrontController.php
index <HASH>..<HASH> 100644
--- a/core/FrontController.php
+++ b/core/FrontController.php
@@ -392,6 +392,7 @@ class FrontController extends Singleton
 
         $loggedIn = false;
 
+        // don't use sessionauth in cli mode
         // try authenticating w/ session first...
         $sessionAuth = $this->makeSessionAuthenticator();
         if ($sessionAuth) {
@@ -647,6 +648,10 @@ class FrontController extends Singleton
 
     private function makeSessionAuthenticator()
     {
+        if (Common::isPhpClimode()) { // don't use the session auth during CLI requests
+            return null;
+        }
+
         $module = Common::getRequestVar('module', self::DEFAULT_MODULE, 'string');
         $action = Common::getRequestVar('action', false);
Do not initiate auth instance if a user is already logged in in FrontController::init() (#<I>)