File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -460,11 +460,11 @@ public function countDisabledUsers(): int {
460460 ->andWhere ($ queryBuilder ->expr ()->eq ('configkey ' , $ queryBuilder ->createNamedParameter ('enabled ' )))
461461 ->andWhere ($ queryBuilder ->expr ()->eq ('configvalue ' , $ queryBuilder ->createNamedParameter ('false ' ), IQueryBuilder::PARAM_STR ));
462462
463-
463+
464464 $ result = $ queryBuilder ->execute ();
465465 $ count = $ result ->fetchColumn ();
466466 $ result ->closeCursor ();
467-
467+
468468 if ($ count !== false ) {
469469 $ count = (int )$ count ;
470470 } else {
@@ -494,7 +494,7 @@ public function countDisabledUsersOfGroups(array $groups): int {
494494 $ result = $ queryBuilder ->execute ();
495495 $ count = $ result ->fetchColumn ();
496496 $ result ->closeCursor ();
497-
497+
498498 if ($ count !== false ) {
499499 $ count = (int )$ count ;
500500 } else {
@@ -611,10 +611,18 @@ public function getByEmail($email) {
611611 private function verifyUid (string $ uid ): bool {
612612 $ appdata = 'appdata_ ' . $ this ->config ->getSystemValueString ('instanceid ' );
613613
614- if ($ uid === '.htaccess ' || $ uid === 'files_external ' || $ uid === '.ocdata ' || $ uid === 'owncloud.log ' || $ uid === 'nextcloud.log ' || $ uid === $ appdata ) {
614+ if (\in_array ($ uid , [
615+ '.htaccess ' ,
616+ 'files_external ' ,
617+ '.ocdata ' ,
618+ 'owncloud.log ' ,
619+ 'nextcloud.log ' ,
620+ $ appdata ], true )) {
615621 return false ;
616622 }
617623
618- return true ;
624+ $ dataDirectory = $ this ->config ->getSystemValueString ('datadirectory ' , \OC ::$ SERVERROOT . '/data ' );
625+
626+ return !file_exists (rtrim ($ dataDirectory , '/ ' ) . '/ ' . $ uid );
619627 }
620628}
You can’t perform that action at this time.
0 commit comments