From: Bjoern Schiessle Date: Thu, 5 Dec 2013 17:49:55 +0000 (+0100) Subject: add method to check if users private/public key exists X-Git-Tag: v7.0.0alpha2~1068 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=85467b973a45a45ae17c3deb5db29f89dddac6e7;p=nextcloud-server.git add method to check if users private/public key exists --- 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; + } } /**