OwnCloud client connection error (503 Service Unavailable - PROPFIND, Error: Using $this when not in object context)

Lukas,

I did not debug the code, I only found an issue at a first glance. In general you would have to wait until the bug had been resolved.

However, I can provide you a code snippet, which you may change (without warranty and at your own risk) and which might solve your issue. Keep in mind, that with patching your installation the integrity check will complain about this file.

From the diff I saw in the code, you have to replace the function loginName2UserName in the file <owncloud_installation_directory/<apps_directory>/user_ldap/lib/Helper.php with the lines below

public static function loginName2UserName($param) {
	if (!isset($param['uid'])) {
		throw new \Exception('key uid is expected to be set in $param');
	}

	//ain't it ironic?
	$helper = new Helper();

	$configPrefixes = $helper->getServerConfigurationPrefixes(true);
	$ldapWrapper = new LDAP();
	$ocConfig = \OC::$server->getConfig();

	$userBackend  = new User_Proxy(
		$configPrefixes, $ldapWrapper, $ocConfig
	);
	$uid = $userBackend->loginName2UserName($param['uid']);
	if ($uid !== false) {
		$param['uid'] = $uid;
	}
    }
1 Like