aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib/access.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/user_ldap/lib/access.php')
-rw-r--r--apps/user_ldap/lib/access.php52
1 files changed, 31 insertions, 21 deletions
diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php
index e041bc32a65..3a8630fbdcc 100644
--- a/apps/user_ldap/lib/access.php
+++ b/apps/user_ldap/lib/access.php
@@ -1,26 +1,36 @@
<?php
-
/**
- * ownCloud – LDAP Access
+ * @author Alexander Bergolth <leo@strike.wu.ac.at>
+ * @author Andreas Fischer <bantu@owncloud.com>
+ * @author Arthur Schiwon <blizzz@owncloud.com>
+ * @author Bart Visscher <bartv@thisnet.nl>
+ * @author Benjamin Diele <benjamin@diele.be>
+ * @author Christopher Schäpers <kondou@ts.unde.re>
+ * @author Donald Buczek <buczek@molgen.mpg.de>
+ * @author Jörn Friedrich Dreyer <jfd@butonic.de>
+ * @author Lorenzo M. Catucci <lorenzo@sancho.ccd.uniroma2.it>
+ * @author Lukas Reschke <lukas@owncloud.com>
+ * @author Lyonel Vincent <lyonel@ezix.org>
+ * @author Morris Jobke <hey@morrisjobke.de>
+ * @author Robin McCorkell <rmccorkell@karoshi.org.uk>
+ * @author Scrutinizer Auto-Fixer <auto-fixer@scrutinizer-ci.com>
*
- * @author Arthur Schiwon
- * @copyright 2012, 2013 Arthur Schiwon blizzz@owncloud.com
+ * @copyright Copyright (c) 2015, ownCloud, Inc.
+ * @license AGPL-3.0
*
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or any later version.
+ * This code is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License, version 3,
+ * as published by the Free Software Foundation.
*
- * This library is distributed in the hope that it will be useful,
+ * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
*
- * You should have received a copy of the GNU Affero General Public
- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ * You should have received a copy of the GNU Affero General Public License, version 3,
+ * along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
-
namespace OCA\user_ldap\lib;
use OCA\User_LDAP\Mapping\AbstractMapping;
@@ -303,7 +313,7 @@ class Access extends LDAPUtility implements user\IUserTools {
/**
* returns the LDAP DN for the given internal ownCloud name of the user
* @param string $name the ownCloud name in question
- * @return string with the LDAP DN on success, otherwise false
+ * @return string|false with the LDAP DN on success, otherwise false
*/
public function username2dn($name) {
$fdn = $this->userMapper->getDNbyName($name);
@@ -322,7 +332,7 @@ class Access extends LDAPUtility implements user\IUserTools {
* returns the internal ownCloud name for the given LDAP DN of the group, false on DN outside of search DN or failure
* @param string $fdn the dn of the group object
* @param string $ldapName optional, the display name of the object
- * @return string with the name to use in ownCloud, false on DN outside of search DN
+ * @return string|false with the name to use in ownCloud, false on DN outside of search DN
*/
public function dn2groupname($fdn, $ldapName = null) {
//To avoid bypassing the base DN settings under certain circumstances
@@ -339,7 +349,7 @@ class Access extends LDAPUtility implements user\IUserTools {
* returns the internal ownCloud name for the given LDAP DN of the user, false on DN outside of search DN or failure
* @param string $dn the dn of the user object
* @param string $ldapName optional, the display name of the object
- * @return string with with the name to use in ownCloud
+ * @return string|false with with the name to use in ownCloud
*/
public function dn2username($fdn, $ldapName = null) {
//To avoid bypassing the base DN settings under certain circumstances
@@ -357,7 +367,7 @@ class Access extends LDAPUtility implements user\IUserTools {
* @param string $dn the dn of the user object
* @param string $ldapName optional, the display name of the object
* @param bool $isUser optional, whether it is a user object (otherwise group assumed)
- * @return string with with the name to use in ownCloud
+ * @return string|false with with the name to use in ownCloud
*/
public function dn2ocname($fdn, $ldapName = null, $isUser = true) {
if($isUser) {
@@ -508,7 +518,7 @@ class Access extends LDAPUtility implements user\IUserTools {
/**
* creates a unique name for internal ownCloud use for users. Don't call it directly.
* @param string $name the display name of the object
- * @return string with with the name to use in ownCloud or false if unsuccessful
+ * @return string|false with with the name to use in ownCloud or false if unsuccessful
*
* Instead of using this method directly, call
* createAltInternalOwnCloudName($name, true)
@@ -530,7 +540,7 @@ class Access extends LDAPUtility implements user\IUserTools {
/**
* creates a unique name for internal ownCloud use for groups. Don't call it directly.
* @param string $name the display name of the object
- * @return string with with the name to use in ownCloud or false if unsuccessful.
+ * @return string|false with with the name to use in ownCloud or false if unsuccessful.
*
* Instead of using this method directly, call
* createAltInternalOwnCloudName($name, false)
@@ -569,7 +579,7 @@ class Access extends LDAPUtility implements user\IUserTools {
* creates a unique name for internal ownCloud use.
* @param string $name the display name of the object
* @param boolean $isUser whether name should be created for a user (true) or a group (false)
- * @return string with with the name to use in ownCloud or false if unsuccessful
+ * @return string|false with with the name to use in ownCloud or false if unsuccessful
*/
private function createAltInternalOwnCloudName($name, $isUser) {
$originalTTL = $this->connection->ldapCacheTTL;