summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2015-06-23 14:51:31 +0200
committerJoas Schilling <nickvergessen@gmx.de>2015-06-23 14:51:31 +0200
commitb1fc1b2e4cbdce06b7e1caae6bb80a1f923e359e (patch)
treed97bb113e1f83c2c857552b1b6fcd58fa7fe05f4
parent063b8ea31da7dfb8a9491d914ea0c7d2de11bd2d (diff)
parente6bf1ca7b302514e6e138438a8eec37dee28c908 (diff)
downloadnextcloud-server-b1fc1b2e4cbdce06b7e1caae6bb80a1f923e359e.tar.gz
nextcloud-server-b1fc1b2e4cbdce06b7e1caae6bb80a1f923e359e.zip
Merge pull request #17096 from owncloud/stable7-fix-deleted-users
[Stable7] fix deleted users during upgrade migration
-rw-r--r--apps/files_sharing/appinfo/update.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/files_sharing/appinfo/update.php b/apps/files_sharing/appinfo/update.php
index e393b1575af..2d2d78a6454 100644
--- a/apps/files_sharing/appinfo/update.php
+++ b/apps/files_sharing/appinfo/update.php
@@ -87,8 +87,14 @@ function removeSharedFolder($mkdirs = true, $chunkSize = 99) {
// create folder Shared for each user
if ($mkdirs) {
+ $logger = \OC::$server->getLogger();
foreach ($unique_users as $user) {
- \OC\Files\Filesystem::initMountPoints($user);
+ try {
+ \OC\Files\Filesystem::initMountPoints($user);
+ } catch(\OC\User\NoUserException $e) {
+ $logger->warning("Update: removeSharedFolder - user '$user' is not present anymore" , array('app' => 'files_sharing'));
+ continue;
+ }
if (!$view->file_exists('/' . $user . '/files/Shared')) {
$view->mkdir('/' . $user . '/files/Shared');
}