aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/user_ldap/group_ldap.php6
-rw-r--r--apps/user_ldap/lib/access.php5
-rw-r--r--apps/user_ldap/lib/wizard.php3
3 files changed, 5 insertions, 9 deletions
diff --git a/apps/user_ldap/group_ldap.php b/apps/user_ldap/group_ldap.php
index 0395a4a80e3..6fcdfae0790 100644
--- a/apps/user_ldap/group_ldap.php
+++ b/apps/user_ldap/group_ldap.php
@@ -518,8 +518,7 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface {
if($isMemberUid) {
//we got uids, need to get their DNs to 'translate' them to user names
$filter = $this->access->combineFilterWithAnd(array(
- \OCP\Util::mb_str_replace('%uid', $member,
- $this->access->connection->ldapLoginFilter, 'UTF-8'),
+ str_replace('%uid', $member, $this->access->connection->ldapLoginFilter),
$this->access->getFilterPartForUserSearch($search)
));
$ldap_users = $this->access->fetchListOfUsers($filter, 'dn');
@@ -608,8 +607,7 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface {
if($isMemberUid) {
//we got uids, need to get their DNs to 'translate' them to user names
$filter = $this->access->combineFilterWithAnd(array(
- \OCP\Util::mb_str_replace('%uid', $member,
- $this->access->connection->ldapLoginFilter, 'UTF-8'),
+ str_replace('%uid', $member, $this->access->connection->ldapLoginFilter),
$this->access->getFilterPartForUserSearch($search)
));
$ldap_users = $this->access->fetchListOfUsers($filter, 'dn');
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index f38d11d4be3..c7747abee51 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -605,8 +605,7 @@ class Access extends LDAPUtility implements user\IUserTools {
*/
public function fetchUsersByLoginName($loginName, $attributes = array('dn')) {
$loginName = $this->escapeFilterPart($loginName);
- $filter = \OCP\Util::mb_str_replace(
- '%uid', $loginName, $this->connection->ldapLoginFilter, 'UTF-8');
+ $filter = str_replace('%uid', $loginName, $this->connection->ldapLoginFilter);
$users = $this->fetchListOfUsers($filter, $attributes);
return $users;
}
@@ -985,7 +984,7 @@ class Access extends LDAPUtility implements user\IUserTools {
$name = iconv('UTF-8', 'ASCII//TRANSLIT', $name);
// Replacements
- $name = \OCP\Util::mb_str_replace(' ', '_', $name, 'UTF-8');
+ $name = str_replace(' ', '_', $name);
// Every remaining disallowed characters will be removed
$name = preg_replace('/[^a-zA-Z0-9_.@-]/u', '', $name);
diff --git a/apps/user_ldap/lib/wizard.php b/apps/user_ldap/lib/wizard.php
index 6ca84c8718f..13ccf805b69 100644
--- a/apps/user_ldap/lib/wizard.php
+++ b/apps/user_ldap/lib/wizard.php
@@ -630,8 +630,7 @@ class Wizard extends LDAPUtility {
if($this->ldap->errno($cr) !== 0) {
throw new \Exception($this->ldap->error($cr));
}
- $filter = \OCP\Util::mb_str_replace(
- '%uid', $loginName, $this->access->connection->ldapLoginFilter, 'UTF-8');
+ $filter = str_replace('%uid', $loginName, $this->access->connection->ldapLoginFilter);
$this->result->addChange('ldap_test_loginname', count($users));
$this->result->addChange('ldap_test_effective_filter', $filter);
return $this->result;