Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern Schiessle <schiessle@owncloud.com>2013-12-05 21:49:55 +0400
committerBjoern Schiessle <schiessle@owncloud.com>2013-12-05 21:49:55 +0400
commitd0afd774b7725f8f32bd8eb2b67aaac0435f41e2 (patch)
tree22f1b65dcdc8356d220b2d1624c04761e46ba5e6 /apps/files_encryption/lib
parent0af65cae37af5bcb71bb878ecaa6a62e9e47fc5b (diff)
add method to check if users private/public key exists
Diffstat (limited to 'apps/files_encryption/lib')
-rw-r--r--apps/files_encryption/lib/util.php17
1 files changed, 13 insertions, 4 deletions
diff --git a/apps/files_encryption/lib/util.php b/apps/files_encryption/lib/util.php
index 434ed225644..ed2c5aab926 100644
--- a/apps/files_encryption/lib/util.php
+++ b/apps/files_encryption/lib/util.php
@@ -101,15 +101,24 @@ class Util {
or !$this->view->file_exists($this->publicKeyPath)
or !$this->view->file_exists($this->privateKeyPath)
) {
-
return false;
-
} else {
-
return true;
-
}
+ }
+ /**
+ * @breif check if the users private & public key exists
+ * @return boolean
+ */
+ public function userKeysExists() {
+ if (
+ $this->view->file_exists($this->privateKeyPath) &&
+ $this->view->file_exists($this->publicKeyPath)) {
+ return true;
+ } else {
+ return false;
+ }
}
/**