aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/User
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2023-09-21 16:34:27 +0200
committerGitHub <noreply@github.com>2023-09-21 16:34:27 +0200
commitef87ff18487d4d78a392f7e44cd9f094a0a73371 (patch)
tree9b53b4478ef21a97ad917ecd4b12f1e14cf48512 /lib/private/User
parent667e9f783d63fcacec664678b5b1ffe8aa7c22ba (diff)
parent0808e19540b0bb79926101efb7d61af3055c9774 (diff)
downloadnextcloud-server-ef87ff18487d4d78a392f7e44cd9f094a0a73371.tar.gz
nextcloud-server-ef87ff18487d4d78a392f7e44cd9f094a0a73371.zip
Merge pull request #39216 from shdehnavi/replace_substr_calls_in_lib_private
Refactor "substr" calls in lib/private to improve code readability
Diffstat (limited to 'lib/private/User')
-rw-r--r--lib/private/User/User.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/User/User.php b/lib/private/User/User.php
index d1185e17aef..69ef82f3e85 100644
--- a/lib/private/User/User.php
+++ b/lib/private/User/User.php
@@ -597,7 +597,7 @@ class User implements IUser {
public function getCloudId() {
$uid = $this->getUID();
$server = rtrim($this->urlGenerator->getAbsoluteURL('/'), '/');
- if (substr($server, -10) === '/index.php') {
+ if (str_ends_with($server, '/index.php')) {
$server = substr($server, 0, -10);
}
$server = $this->removeProtocolFromUrl($server);