summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-12-13 08:41:12 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-01-02 15:11:13 +0100
commit3c0b1bdc30d7d8f386155ad1f9cc56c3c061b4bc (patch)
tree98c6784dcd704219a61147b1674f88f199fc4a3d /apps/user_ldap
parente4a780127d8b3c7f3a470457157cb8b84b333e99 (diff)
downloadnextcloud-server-3c0b1bdc30d7d8f386155ad1f9cc56c3c061b4bc.tar.gz
nextcloud-server-3c0b1bdc30d7d8f386155ad1f9cc56c3c061b4bc.zip
Remove redundant cast to string in user_ldap
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/lib/Access.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php
index 6b12e0edc11..1cc0c62ff1d 100644
--- a/apps/user_ldap/lib/Access.php
+++ b/apps/user_ldap/lib/Access.php
@@ -1376,7 +1376,7 @@ class Access extends LDAPUtility {
$name = preg_replace('/[^a-zA-Z0-9_.@-]/u', '', $name);
if (strlen($name) > 64) {
- $name = (string)hash('sha256', $name, false);
+ $name = hash('sha256', $name, false);
}
if ($name === '') {
@@ -1389,7 +1389,7 @@ class Access extends LDAPUtility {
public function sanitizeGroupIDCandidate(string $candidate): string {
$candidate = trim($candidate);
if (strlen($candidate) > 64) {
- $candidate = (string)hash('sha256', $candidate, false);
+ $candidate = hash('sha256', $candidate, false);
}
if ($candidate === '') {
throw new \InvalidArgumentException('provided name template for username does not contain any allowed characters');