diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2016-05-12 17:55:58 +0300 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2016-05-25 17:06:08 +0300 |
commit | b6163183276470039f3a2a2094d1a6224c272f28 (patch) | |
tree | d45ec52cb1af52cdb35e3323ba4ed00e7c8e0184 | |
parent | db2e9df5f000b129e9dad2ce801baada0a17a8a4 (diff) |
Fix several minor issues
-rw-r--r-- | apps/user_ldap/lib/Access.php | 4 | ||||
-rw-r--r-- | apps/user_ldap/lib/User/User.php | 9 | ||||
-rw-r--r-- | apps/user_ldap/lib/User_LDAP.php | 2 | ||||
-rw-r--r-- | apps/user_ldap/lib/Wizard.php | 5 |
4 files changed, 9 insertions, 11 deletions
diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index 8137deb023d..6ec90cfff8f 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -316,7 +316,7 @@ class Access extends LDAPUtility implements IUserTools { * @return string|false LDAP DN on success, otherwise false */ public function groupname2dn($name) { - return $this->groupMapper->getDNbyName($name); + return $this->groupMapper->getDNByName($name); } /** @@ -325,7 +325,7 @@ class Access extends LDAPUtility implements IUserTools { * @return string|false with the LDAP DN on success, otherwise false */ public function username2dn($name) { - $fdn = $this->userMapper->getDNbyName($name); + $fdn = $this->userMapper->getDNByName($name); //Check whether the DN belongs to the Base, to avoid issues on multi- //server setups diff --git a/apps/user_ldap/lib/User/User.php b/apps/user_ldap/lib/User/User.php index 828648906fb..8f7666790c1 100644 --- a/apps/user_ldap/lib/User/User.php +++ b/apps/user_ldap/lib/User/User.php @@ -464,7 +464,7 @@ class User { } } if(!is_null($quota)) { - $user = $this->userManager->get($this->uid)->setQuota($quota); + $this->userManager->get($this->uid)->setQuota($quota); } } @@ -502,16 +502,13 @@ class User { */ private function setOwnCloudAvatar() { if(!$this->image->valid()) { - $this->log->log('user_ldap', 'jpegPhoto data invalid for '.$this->dn, - \OCP\Util::ERROR); + $this->log->log('jpegPhoto data invalid for '.$this->dn, \OCP\Util::ERROR); return; } //make sure it is a square and not bigger than 128x128 $size = min(array($this->image->width(), $this->image->height(), 128)); if(!$this->image->centerCrop($size)) { - $this->log->log('user_ldap', - 'croping image for avatar failed for '.$this->dn, - \OCP\Util::ERROR); + $this->log->log('croping image for avatar failed for '.$this->dn, \OCP\Util::ERROR); return; } diff --git a/apps/user_ldap/lib/User_LDAP.php b/apps/user_ldap/lib/User_LDAP.php index 1000f3ba530..87c603fc753 100644 --- a/apps/user_ldap/lib/User_LDAP.php +++ b/apps/user_ldap/lib/User_LDAP.php @@ -98,7 +98,7 @@ class User_LDAP extends BackendUtility implements \OCP\IUserBackend, \OCP\UserIn public function getLDAPUserByLoginName($loginName) { //find out dn of the user name $attrs = $this->access->userManager->getAttributes(); - $users = $this->access->fetchUsersByLoginName($loginName, $attrs, 1); + $users = $this->access->fetchUsersByLoginName($loginName, $attrs); if(count($users) < 1) { throw new \Exception('No user available for the given login name on ' . $this->access->connection->ldapHost . ':' . $this->access->connection->ldapPort); diff --git a/apps/user_ldap/lib/Wizard.php b/apps/user_ldap/lib/Wizard.php index f8c82a29701..f71d5af2c49 100644 --- a/apps/user_ldap/lib/Wizard.php +++ b/apps/user_ldap/lib/Wizard.php @@ -34,6 +34,7 @@ namespace OCA\User_LDAP; use OC\ServerNotAvailableException; class Wizard extends LDAPUtility { + /** @var \OCP\IL10N */ static protected $l; protected $access; protected $cr; @@ -1033,12 +1034,12 @@ class Wizard extends LDAPUtility { $host = $this->configuration->ldapHost; $hostInfo = parse_url($host); if(!$hostInfo) { - throw new \Exception($this->l->t('Invalid Host')); + throw new \Exception(self::$l->t('Invalid Host')); } \OCP\Util::writeLog('user_ldap', 'Wiz: Attempting to connect ', \OCP\Util::DEBUG); $cr = $this->ldap->connect($host, $port); if(!is_resource($cr)) { - throw new \Exception($this->l->t('Invalid Host')); + throw new \Exception(self::$l->t('Invalid Host')); } \OCP\Util::writeLog('user_ldap', 'Wiz: Setting LDAP Options ', \OCP\Util::DEBUG); |