$recoveryAdminEnabled = OC_Appconfig::getValue('files_encryption', 'recoveryAdminEnabled');\r
$recoveryEnabledForUser = $util->recoveryEnabledForUser();\r
\r
-\OCP\Util::addscript('files_encryption', 'settings-personal');\r
-\OCP\Util::addScript('settings', 'personal');\r
+$result = false;\r
\r
-$tmpl->assign('recoveryEnabled', $recoveryAdminEnabled);\r
-$tmpl->assign('recoveryEnabledForUser', $recoveryEnabledForUser);\r
-$tmpl->assign('privateKeySet', $privateKeySet);\r
+if ($recoveryAdminEnabled || !$privateKeySet) {\r
\r
-return $tmpl->fetchPage();\r
+ \OCP\Util::addscript('files_encryption', 'settings-personal');\r
+ \OCP\Util::addScript('settings', 'personal');\r
+\r
+ $tmpl->assign('recoveryEnabled', $recoveryAdminEnabled);\r
+ $tmpl->assign('recoveryEnabledForUser', $recoveryEnabledForUser);\r
+ $tmpl->assign('privateKeySet', $privateKeySet);\r
+\r
+ $result = $tmpl->fetchPage();\r
+}\r
+\r
+return $result;\r
\r