2828use OCP \Accounts \IAccountManager ;
2929use OCP \AppFramework \Db \DoesNotExistException ;
3030use OCP \AppFramework \Utility \ITimeFactory ;
31+ use OCP \Config \IUserConfig ;
3132use OCP \Files \Config \IMountProviderCollection ;
3233use OCP \Files \File ;
3334use OCP \Files \IMimeTypeDetector ;
3435use OCP \Files \IRootFolder ;
3536use OCP \Files \NotFoundException ;
3637use OCP \Http \Client \IClientService ;
3738use OCP \IAppConfig ;
38- use OCP \IConfig ;
3939use OCP \IGroupManager ;
4040use OCP \IL10N ;
4141use OCP \IURLGenerator ;
@@ -61,8 +61,8 @@ public function __construct(
6161 private SignFileService $ signFileService ,
6262 private RequestSignatureService $ requestSignatureService ,
6363 private CertificateEngineFactory $ certificateEngineFactory ,
64- private IConfig $ config ,
6564 private IAppConfig $ appConfig ,
65+ private IUserConfig $ userConfig ,
6666 private IMountProviderCollection $ mountProviderCollection ,
6767 private NewUserMailHelper $ newUserMail ,
6868 private IdentifyMethodService $ identifyMethodService ,
@@ -160,7 +160,7 @@ public function createToSign(string $uuid, string $email, string $password, ?str
160160
161161 $ this ->updateIdentifyMethodToAccount ($ signRequest ->getId (), $ email , $ newUser ->getUID ());
162162
163- if ($ this ->config -> getAppValue ('core ' , 'newUser.sendEmail ' , 'yes ' ) === 'yes ' ) {
163+ if ($ this ->appConfig -> getValueString ('core ' , 'newUser.sendEmail ' , 'yes ' ) === 'yes ' ) {
164164 try {
165165 $ emailTemplate = $ this ->newUserMail ->generateTemplate ($ newUser , false );
166166 $ this ->newUserMail ->sendMail ($ newUser , $ emailTemplate );
@@ -262,16 +262,15 @@ private function getUserConfigByKey(string $key, ?IUser $user = null): string {
262262 if (!$ user ) {
263263 return '' ;
264264 }
265-
266- return $ this ->config ->getUserValue ($ user ->getUID (), Application::APP_ID , $ key );
265+ return $ this ->userConfig ->getValueString ($ user ->getUID (), Application::APP_ID , $ key );
267266 }
268267
269268 private function getUserConfigIdDocsFilters (?IUser $ user = null ): array {
270269 if (!$ user ) {
271270 return [];
272271 }
273272
274- $ value = $ this ->config -> getUserValue ($ user ->getUID (), Application::APP_ID , 'id_docs_filters ' , '' );
273+ $ value = $ this ->userConfig -> getValueString ($ user ->getUID (), Application::APP_ID , 'id_docs_filters ' , '' );
275274 if (empty ($ value )) {
276275 return [];
277276 }
@@ -285,7 +284,7 @@ private function getUserConfigCrlFilters(?IUser $user = null): array {
285284 return [];
286285 }
287286
288- $ value = $ this ->config -> getUserValue ($ user ->getUID (), Application::APP_ID , 'crl_filters ' , '' );
287+ $ value = $ this ->userConfig -> getValueString ($ user ->getUID (), Application::APP_ID , 'crl_filters ' , '' );
289288 if (empty ($ value )) {
290289 return [];
291290 }
@@ -299,7 +298,7 @@ private function getUserConfigCrlSort(?IUser $user): array {
299298 return ['sortBy ' => 'revoked_at ' , 'sortOrder ' => 'DESC ' ];
300299 }
301300
302- $ value = $ this ->config -> getUserValue ($ user ->getUID (), Application::APP_ID , 'crl_sort ' , '' );
301+ $ value = $ this ->userConfig -> getValueString ($ user ->getUID (), Application::APP_ID , 'crl_sort ' , '' );
303302 if (empty ($ value )) {
304303 return ['sortBy ' => 'revoked_at ' , 'sortOrder ' => 'DESC ' ];
305304 }
@@ -313,7 +312,7 @@ private function getUserConfigIdDocsSort(?IUser $user): array {
313312 return ['sortBy ' => null , 'sortOrder ' => null ];
314313 }
315314
316- $ value = $ this ->config -> getUserValue ($ user ->getUID (), Application::APP_ID , 'id_docs_sort ' , '' );
315+ $ value = $ this ->userConfig -> getValueString ($ user ->getUID (), Application::APP_ID , 'id_docs_sort ' , '' );
317316 if (empty ($ value )) {
318317 return ['sortBy ' => null , 'sortOrder ' => null ];
319318 }
0 commit comments