summaryrefslogtreecommitdiffstats
path: root/apps/files_encryption/lib/session.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_encryption/lib/session.php')
-rw-r--r--apps/files_encryption/lib/session.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/apps/files_encryption/lib/session.php b/apps/files_encryption/lib/session.php
index 1911386cd12..f5ce7083af0 100644
--- a/apps/files_encryption/lib/session.php
+++ b/apps/files_encryption/lib/session.php
@@ -113,6 +113,33 @@ class Session {
}
/**
+ * @brief Sets status if we tried to initialize the encyption app
+ * @param bool $privateKey true=initialized false=not initialized
+ * @return bool
+ */
+ public function setInitialized($init) {
+
+ \OC::$session->set('encryptionInitialized', $init);
+
+ return true;
+
+ }
+
+
+ /**
+ * @brief Gets status if we already tried to initialize the encryption app
+ * @returns bool
+ *
+ */
+ public function getInitialized() {
+ if (!is_null(\OC::$session->get('encryptionInitialized'))) {
+ return \OC::$session->get('encryptionInitialized');
+ } else {
+ return false;
+ }
+ }
+
+ /**
* @brief Gets user or public share private key from session
* @returns string $privateKey The user's plaintext private key
*