diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2013-12-05 18:49:55 +0100 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2013-12-06 12:20:14 +0100 |
commit | 85467b973a45a45ae17c3deb5db29f89dddac6e7 (patch) | |
tree | fdc05c5ea2d18abadaed38cbec568439341fdb4c /apps/files_encryption/lib | |
parent | 4dd84b3627d5667b61638363244621ad93a5632f (diff) | |
download | nextcloud-server-85467b973a45a45ae17c3deb5db29f89dddac6e7.tar.gz nextcloud-server-85467b973a45a45ae17c3deb5db29f89dddac6e7.zip |
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.php | 17 |
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; + } } /** |