diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2015-03-31 15:33:44 +0200 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2015-04-10 09:12:37 +0200 |
commit | 077ab272818036129affc288a2bd51b2c2105fc0 (patch) | |
tree | 75de0966b640d1a0cfb137ff3659ccd1fa980b99 /apps/user_ldap/lib | |
parent | 8964c5068cec5d56ef5107c4cbcb10e55e4ef4a5 (diff) | |
download | nextcloud-server-077ab272818036129affc288a2bd51b2c2105fc0.tar.gz nextcloud-server-077ab272818036129affc288a2bd51b2c2105fc0.zip |
fix_tests
Conflicts:
apps/user_ldap/tests/user_ldap.php
Diffstat (limited to 'apps/user_ldap/lib')
-rw-r--r-- | apps/user_ldap/lib/user/manager.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/user/manager.php b/apps/user_ldap/lib/user/manager.php index b99c9715e58..b5d402f1fac 100644 --- a/apps/user_ldap/lib/user/manager.php +++ b/apps/user_ldap/lib/user/manager.php @@ -149,6 +149,11 @@ class Manager { $this->access->getUserMapper()); } + /** + * @brief returns a User object by it's ownCloud username + * @param string the DN or username of the user + * @return \OCA\user_ldap\lib\user\User|\OCA\user_ldap\lib\user\OfflineUser|null + */ protected function createInstancyByUserName($id) { //most likely a uid. Check whether it is a deleted user if($this->isDeletedUser($id)) { @@ -158,12 +163,12 @@ class Manager { if($dn !== false) { return $this->createAndCache($dn, $id); } - throw new \Exception('Could not create User instance'); + return null; } /** * @brief returns a User object by it's DN or ownCloud username - * @param string the DN or username of the user + * @param string the username of the user * @return \OCA\user_ldap\lib\user\User|\OCA\user_ldap\lib\user\OfflineUser|null * @throws \Exception when connection could not be established */ |