summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorroot <roger.szabo@web.de>2016-07-27 15:10:35 +0800
committerroot <roger.szabo@web.de>2016-07-27 15:10:35 +0800
commit32fb6beac3fe9b202ed4a52f3a2bfede72cbc19b (patch)
tree80a947f8dca98263368c050789d1abd40c53641c /apps/user_ldap
parent1fb080df2bd105ece36f32dba41f401167637a8b (diff)
downloadnextcloud-server-32fb6beac3fe9b202ed4a52f3a2bfede72cbc19b.tar.gz
nextcloud-server-32fb6beac3fe9b202ed4a52f3a2bfede72cbc19b.zip
final changes
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/appinfo/update.php1
-rw-r--r--apps/user_ldap/lib/IUserLDAP.php3
-rw-r--r--apps/user_ldap/lib/LDAPProvider.php23
-rw-r--r--apps/user_ldap/lib/LDAPProviderFactory.php1
-rw-r--r--apps/user_ldap/tests/Jobs/CleanUpTest.php2
5 files changed, 13 insertions, 17 deletions
diff --git a/apps/user_ldap/appinfo/update.php b/apps/user_ldap/appinfo/update.php
index f816a7ec9c6..b1bbbaec142 100644
--- a/apps/user_ldap/appinfo/update.php
+++ b/apps/user_ldap/appinfo/update.php
@@ -2,7 +2,6 @@
/**
* @author Roger Szabo <roger.szabo@web.de>
*
- * @copyright Copyright (c) 2016, ownCloud, Inc.
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
diff --git a/apps/user_ldap/lib/IUserLDAP.php b/apps/user_ldap/lib/IUserLDAP.php
index c04e2ddffe7..2151795b647 100644
--- a/apps/user_ldap/lib/IUserLDAP.php
+++ b/apps/user_ldap/lib/IUserLDAP.php
@@ -2,7 +2,6 @@
/**
* @author Roger Szabo <roger.szabo@web.de>
*
- * @copyright Copyright (c) 2016, ownCloud, Inc.
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
@@ -42,7 +41,7 @@ interface IUserLDAP {
/**
* Return the username for the given LDAP DN, if available.
* @param string $dn
- * @return string|false with the name to use in ownCloud
+ * @return string|false with the username
*/
public function dn2UserName($dn);
}
diff --git a/apps/user_ldap/lib/LDAPProvider.php b/apps/user_ldap/lib/LDAPProvider.php
index 8d6b5600596..c4bb29452c2 100644
--- a/apps/user_ldap/lib/LDAPProvider.php
+++ b/apps/user_ldap/lib/LDAPProvider.php
@@ -2,7 +2,6 @@
/**
* @author Roger Szabo <roger.szabo@web.de>
*
- * @copyright Copyright (c) 2016, ownCloud, Inc.
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
@@ -58,8 +57,8 @@ class LDAPProvider implements ILDAPProvider, IDeletionFlagSupport {
}
/**
- * Translate an ownCloud user id to LDAP DN
- * @param string $uid ownCloud user id
+ * Translate an user id to LDAP DN
+ * @param string $uid user id
* @return string with the LDAP DN
* @throws \Exception if translation was unsuccessful
*/
@@ -75,16 +74,16 @@ class LDAPProvider implements ILDAPProvider, IDeletionFlagSupport {
}
/**
- * Translate a LDAP DN to an ownCloud user name. If there is no mapping between
+ * Translate a LDAP DN to an internal user name. If there is no mapping between
* the DN and the user name, a new one will be created.
* @param string $dn LDAP DN
- * @return string with the ownCloud user name
+ * @return string with the internal user name
* @throws \Exception if translation was unsuccessful
*/
public function getUserName($dn) {
$result = $this->backend->dn2UserName($dn);
if(!$result){
- throw new \Exception('Translation to ownCloud user name unsuccessful');
+ throw new \Exception('Translation to internal user name unsuccessful');
}
return $result;
}
@@ -110,7 +109,7 @@ class LDAPProvider implements ILDAPProvider, IDeletionFlagSupport {
/**
* Return a new LDAP connection resource for the specified user.
* The connection must be closed manually.
- * @param string $uid ownCloud user id
+ * @param string $uid user id
* @return resource of the LDAP connection
* @throws \Exception if user id was not found in LDAP
*/
@@ -123,7 +122,7 @@ class LDAPProvider implements ILDAPProvider, IDeletionFlagSupport {
/**
* Get the LDAP base for users.
- * @param string $uid ownCloud user id
+ * @param string $uid user id
* @return string the base for users
* @throws \Exception if user id was not found in LDAP
*/
@@ -136,7 +135,7 @@ class LDAPProvider implements ILDAPProvider, IDeletionFlagSupport {
/**
* Get the LDAP base for groups.
- * @param string $uid ownCloud user id
+ * @param string $uid user id
* @return string the base for groups
* @throws \Exception if user id was not found in LDAP
*/
@@ -149,7 +148,7 @@ class LDAPProvider implements ILDAPProvider, IDeletionFlagSupport {
/**
* Clear the cache if a cache is used, otherwise do nothing.
- * @param string $uid ownCloud user id
+ * @param string $uid user id
* @throws \Exception if user id was not found in LDAP
*/
public function clearCache($uid) {
@@ -171,7 +170,7 @@ class LDAPProvider implements ILDAPProvider, IDeletionFlagSupport {
/**
* Flag record for deletion.
- * @param string $uid ownCloud user id
+ * @param string $uid user id
*/
public function flagRecord($uid) {
$this->deletedUsersIndex->markUser($uid);
@@ -179,7 +178,7 @@ class LDAPProvider implements ILDAPProvider, IDeletionFlagSupport {
/**
* Unflag record for deletion.
- * @param string $uid ownCloud user id
+ * @param string $uid user id
*/
public function unflagRecord($uid) {
//do nothing
diff --git a/apps/user_ldap/lib/LDAPProviderFactory.php b/apps/user_ldap/lib/LDAPProviderFactory.php
index 6525d14d3fd..c956f9d957a 100644
--- a/apps/user_ldap/lib/LDAPProviderFactory.php
+++ b/apps/user_ldap/lib/LDAPProviderFactory.php
@@ -2,7 +2,6 @@
/**
* @author Roger Szabo <roger.szabo@web.de>
*
- * @copyright Copyright (c) 2016, ownCloud, Inc.
* @license AGPL-3.0
*
* This code is free software: you can redistribute it and/or modify
diff --git a/apps/user_ldap/tests/Jobs/CleanUpTest.php b/apps/user_ldap/tests/Jobs/CleanUpTest.php
index 4785a227d26..45e7998da01 100644
--- a/apps/user_ldap/tests/Jobs/CleanUpTest.php
+++ b/apps/user_ldap/tests/Jobs/CleanUpTest.php
@@ -37,7 +37,7 @@ class CleanUpTest extends \Test\TestCase {
->getMock();
$mocks['ocConfig'] = $this->getMock('\OCP\IConfig');
$mocks['db'] = $this->getMock('\OCP\IDBConnection');
- $mocks['helper'] = new \OCA\User_LDAP\Helper();
+ $mocks['helper'] = $this->getMock('\OCA\User_LDAP\Helper');
return $mocks;
}