diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2012-08-09 13:47:27 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2012-08-09 13:47:27 +0200 |
commit | 800942ece74ac336c4a9213228f14406d7e494f7 (patch) | |
tree | b717c18b91245041f211ae96d670d7d4d41c5d4f /apps/files_encryption/ajax | |
parent | 5a261b5b8ffd01c34ce009a431a5587c548fa9a7 (diff) | |
download | nextcloud-server-800942ece74ac336c4a9213228f14406d7e494f7.tar.gz nextcloud-server-800942ece74ac336c4a9213228f14406d7e494f7.zip |
change key password when user switches from client to server side encryption.
make use of the keymanager class in changekeypasscode()
Diffstat (limited to 'apps/files_encryption/ajax')
-rw-r--r-- | apps/files_encryption/ajax/mode.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/apps/files_encryption/ajax/mode.php b/apps/files_encryption/ajax/mode.php index c81d4947956..f1a026ca431 100644 --- a/apps/files_encryption/ajax/mode.php +++ b/apps/files_encryption/ajax/mode.php @@ -32,6 +32,7 @@ if ($result->fetchRow()){ } else { $query = OC_DB::prepare( 'INSERT INTO *PREFIX*encryption ( mode, uid ) VALUES( ?, ? )' ); } + if ( (!$changePasswd || $passwdChanged) && $query->execute(array($mode, \OCP\User::getUser())) ) { OCP\JSON::success(); } else { |