app.php 749 B

1234567891011121314151617181920
  1. <?php
  2. OC::$CLASSPATH['OC_Crypt'] = 'apps/files_encryption/lib/crypt.php';
  3. OC::$CLASSPATH['OC_CryptStream'] = 'apps/files_encryption/lib/cryptstream.php';
  4. OC::$CLASSPATH['OC_FileProxy_Encryption'] = 'apps/files_encryption/lib/proxy.php';
  5. OC_FileProxy::register(new OC_FileProxy_Encryption());
  6. OCP\Util::connectHook('OC_User','post_login','OC_Crypt','loginListener');
  7. stream_wrapper_register('crypt','OC_CryptStream');
  8. if(!isset($_SESSION['enckey']) and OCP\User::isLoggedIn()){//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)
  9. OCP\User::logout();
  10. header("Location: ".OC::$WEBROOT.'/');
  11. exit();
  12. }
  13. OCP\App::registerAdmin('files_encryption', 'settings');