Merge pull request #33793 from nextcloud/fix/noid/rtrim-cloud-id

rtrim cloudId url earlier
This commit is contained in:
Maxence Lange 2022-09-15 10:46:39 -01:00 committed by GitHub
commit 381eb046b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -558,11 +558,11 @@ class User implements IUser {
*/
public function getCloudId() {
$uid = $this->getUID();
$server = $this->urlGenerator->getAbsoluteURL('/');
$server = rtrim($this->urlGenerator->getAbsoluteURL('/'), '/');
if (substr($server, -10) === '/index.php') {
$server = substr($server, 0, -10);
}
$server = rtrim($this->removeProtocolFromUrl($server), '/');
$server = $this->removeProtocolFromUrl($server);
return $uid . '@' . $server;
}