Merge pull request #22435 from owncloud/trashbin-hook-nouser
Don't resize trash when no user
This commit is contained in:
commit
ff4e040971
|
@ -40,10 +40,13 @@ class Hooks {
|
||||||
if( \OCP\App::isEnabled('files_trashbin') ) {
|
if( \OCP\App::isEnabled('files_trashbin') ) {
|
||||||
$uid = $params['uid'];
|
$uid = $params['uid'];
|
||||||
Trashbin::deleteUser($uid);
|
Trashbin::deleteUser($uid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function post_write_hook($params) {
|
public static function post_write_hook($params) {
|
||||||
Trashbin::resizeTrash(\OCP\User::getUser());
|
$user = \OCP\User::getUser();
|
||||||
|
if (!empty($user)) {
|
||||||
|
Trashbin::resizeTrash($user);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue