diff options
author | Bjoern Schiessle <bjoern@schiessle.org> | 2016-11-23 12:07:04 +0100 |
---|---|---|
committer | Bjoern Schiessle <bjoern@schiessle.org> | 2016-11-23 12:20:43 +0100 |
commit | 8a401ee15687059836c93dda62ee5ea3fbf800cf (patch) | |
tree | 8326dc5b2df8660f47946926af30d330c234e6f3 /apps/encryption/lib/Session.php | |
parent | 558a934842a9f66a873f24b8107fca1fc68fb791 (diff) | |
download | nextcloud-server-8a401ee15687059836c93dda62ee5ea3fbf800cf.tar.gz nextcloud-server-8a401ee15687059836c93dda62ee5ea3fbf800cf.zip |
check if session is initialized
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
Diffstat (limited to 'apps/encryption/lib/Session.php')
-rw-r--r-- | apps/encryption/lib/Session.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/apps/encryption/lib/Session.php b/apps/encryption/lib/Session.php index 92132d6080c..a61ee25fadb 100644 --- a/apps/encryption/lib/Session.php +++ b/apps/encryption/lib/Session.php @@ -68,6 +68,16 @@ class Session { } /** + * check if encryption was initialized successfully + * + * @return bool + */ + public function isReady() { + $status = $this->getStatus(); + return $status === self::INIT_SUCCESSFUL; + } + + /** * Gets user or public share private key from session * * @return string $privateKey The user's plaintext private key |