summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@arthur-schiwon.de>2018-04-11 15:33:36 +0200
committerArthur Schiwon <blizzz@arthur-schiwon.de>2018-08-09 23:45:11 +0200
commita39c995083c6cec88f79558699d4d20bd66f30f2 (patch)
treeb094eaff6528e000e66c8647e4360cd83f4b01a1
parent3450ed4536030ccc8ddd34836fc2e17ddc328a18 (diff)
downloadnextcloud-server-a39c995083c6cec88f79558699d4d20bd66f30f2.tar.gz
nextcloud-server-a39c995083c6cec88f79558699d4d20bd66f30f2.zip
FIX: emit assignedUserId only for users
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
-rw-r--r--apps/user_ldap/lib/Access.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php
index 91089e779a0..a03b4a4cb9c 100644
--- a/apps/user_ldap/lib/Access.php
+++ b/apps/user_ldap/lib/Access.php
@@ -609,23 +609,23 @@ class Access extends LDAPUtility implements IUserTools {
//NOTE: mind, disabling cache affects only this instance! Using it
// outside of core user management will still cache the user as non-existing.
$originalTTL = $this->connection->ldapCacheTTL;
- $this->connection->setConfiguration(array('ldapCacheTTL' => 0));
+ $this->connection->setConfiguration(['ldapCacheTTL' => 0]);
if(($isUser && $intName !== '' && !$this->ncUserManager->userExists($intName))
|| (!$isUser && !\OC::$server->getGroupManager()->groupExists($intName))) {
if($mapper->map($fdn, $intName, $uuid)) {
- $this->connection->setConfiguration(array('ldapCacheTTL' => $originalTTL));
- if($this->ncUserManager instanceof PublicEmitter) {
+ $this->connection->setConfiguration(['ldapCacheTTL' => $originalTTL]);
+ if($this->ncUserManager instanceof PublicEmitter && $isUser) {
$this->ncUserManager->emit('\OC\User', 'assignedUserId', [$intName]);
}
$newlyMapped = true;
return $intName;
}
}
- $this->connection->setConfiguration(array('ldapCacheTTL' => $originalTTL));
+ $this->connection->setConfiguration(['ldapCacheTTL' => $originalTTL]);
$altName = $this->createAltInternalOwnCloudName($intName, $isUser);
if(is_string($altName) && $mapper->map($fdn, $altName, $uuid)) {
- if($this->ncUserManager instanceof PublicEmitter) {
+ if($this->ncUserManager instanceof PublicEmitter && $isUser) {
$this->ncUserManager->emit('\OC\User', 'assignedUserId', [$intName]);
}
$newlyMapped = true;