X Tutup
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions changelog/unreleased/36365
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Bugfix: Do not create error log about user home in user creation

The server was producing an error log in every user creation and every first sync of a user account.
This problem fixed with empty value control.

https://github.com/owncloud/core/issues/30853
https://github.com/owncloud/core/issues/32438
https://github.com/owncloud/core/pull/36365
8 changes: 7 additions & 1 deletion lib/private/User/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
* @method void setState(integer $state)
* @method string getQuota()
* @method void setQuota(string $quota)
* @method string getHome()
* @method void setHome(string $home)
*
* @package OC\User
Expand Down Expand Up @@ -115,4 +114,11 @@ public function setSearchTerms(array $terms) {
public function getSearchTerms() {
return $this->terms;
}

/**
* @return string
*/
public function getHome() {
return (string) $this->getter('home');
}
}
2 changes: 1 addition & 1 deletion lib/private/User/SyncService.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ private function syncHome(Account $a, UserInterface $backend) {
}
// Home is handled differently, it should only be set on account creation, when there is no home already set
// Otherwise it could change on a sync and result in a new user folder being created
if ($a->getHome() === null) {
if ($a->getHome() === '') {
$home = false;
if ($proividesHome) {
$home = $backend->getHome($uid);
Expand Down
X Tutup