nextcloud/apps/files_encryption/appinfo/app.php

21 lines
761 B
PHP
Raw Normal View History

2011-10-21 19:02:11 +04:00
<?php
OC::$CLASSPATH['OC_Crypt'] = 'apps/files_encryption/lib/crypt.php';
OC::$CLASSPATH['OC_CryptStream'] = 'apps/files_encryption/lib/cryptstream.php';
OC::$CLASSPATH['OC_FileProxy_Encryption'] = 'apps/files_encryption/lib/proxy.php';
OC_FileProxy::register(new OC_FileProxy_Encryption());
2012-11-04 14:10:46 +04:00
OCP\Util::connectHook('OC_User', 'post_login', 'OC_Crypt', 'loginListener');
2011-10-21 19:02:11 +04:00
2012-11-04 14:10:46 +04:00
stream_wrapper_register('crypt', 'OC_CryptStream');
// force the user to re-loggin if the encryption key isn't unlocked
// (happens when a user is logged in before the encryption app is enabled)
if ( ! isset($_SESSION['enckey']) and OCP\User::isLoggedIn()) {
OCP\User::logout();
header("Location: ".OC::$WEBROOT.'/');
exit();
}
OCP\App::registerAdmin('files_encryption', 'settings');