diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2015-03-31 11:15:47 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-04-07 13:30:28 +0200 |
commit | 0f28d538a0af769220bcba120f0a7340dd0aba5f (patch) | |
tree | 7c3dc65e4f1c9d7d4330563fb4c1eb7c6ed51827 /apps/encryption/settings | |
parent | e0ab2c34eab970d82ddc6c9f5b3b752243fc716a (diff) | |
download | nextcloud-server-0f28d538a0af769220bcba120f0a7340dd0aba5f.tar.gz nextcloud-server-0f28d538a0af769220bcba120f0a7340dd0aba5f.zip |
add session class to handle all session operations
Diffstat (limited to 'apps/encryption/settings')
-rw-r--r-- | apps/encryption/settings/settings-personal.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/apps/encryption/settings/settings-personal.php b/apps/encryption/settings/settings-personal.php index 540897b829d..83594b8467e 100644 --- a/apps/encryption/settings/settings-personal.php +++ b/apps/encryption/settings/settings-personal.php @@ -9,6 +9,8 @@ // Add CSS stylesheet \OC_Util::addStyle('encryption', 'settings-personal'); +$session = new \OCA\Encryption\Session(\OC::$server->getSession()); + $tmpl = new OCP\Template('encryption', 'settings-personal'); $crypt = new \OCA\Encryption\Crypto\Crypt( \OC::$server->getLogger(), @@ -19,8 +21,8 @@ $keymanager = new \OCA\Encryption\KeyManager( $crypt, \OC::$server->getConfig(), \OC::$server->getUserSession(), - \OC::$server->getSession(), - \OC::$server->getLogger(),); + $session, + \OC::$server->getLogger()); $user = \OCP\User::getUser(); @@ -29,11 +31,9 @@ $view = new \OC\Files\View('/'); $util = new \OCA\Encryption\Util( new \OC\Files\View(), $crypt, $keymanager, \OC::$server->getLogger(), \OC::$server->getUserSession(), \OC::$server->getConfig()); -$session = \OC::$server->getSession(); - -$privateKeySet = $session->get('privateKey') !== false; +$privateKeySet = $session->isPrivateKeySet(); // did we tried to initialize the keys for this session? -$initialized = $session->getInitialized(); +$initialized = $session->getStatus(); $recoveryAdminEnabled = \OC::$server->getConfig()->getAppValue('encryption', 'recoveryAdminEnabled'); $recoveryEnabledForUser = $util->recoveryEnabledForUser(); |