You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

334 lines
9.0 KiB

10 years ago
10 years ago
13 years ago
LDAP User Cleanup: Port from stable7 without further adjustements LDAP User Cleanup background job for user clean up adjust user backend for clean up register background job remove dead code dependency injection make Helper non-static for proper testing check whether it is OK to run clean up job. Do not forget to pass arguments. use correct method to get the config from server methods can be private, proper indirect testing is given no automatic user deletion make limit readable for test purposes make method less complex add first tests let preferences accept limit and offset for getUsersForValue DI via constructor does not work for background jobs after detecting, now we have retrieving deleted users and their details we need this method to be public for now finalize export method, add missing getter clean up namespaces and get rid of unnecessary files helper is not static anymore cleanup according to scrutinizer add cli tool to show deleted users uses are necessary after recent namespace change also remove user from mappings table on deletion add occ command to delete users fix use statement improve output big fixes / improvements PHP doc return true in userExists early for cleaning up deleted users bump version control state and interval with one config.php setting, now ldapUserCleanupInterval. 0 will disable it. enabled by default. improve doc rename cli method to be consistent with others introduce ldapUserCleanupInterval in sample config don't show last login as unix epoche start when no login happend less log output consistent namespace for OfflineUser rename GarbageCollector to DeletedUsersIndex and move it to user subdir fix unit tests add tests for deleteUser more test adjustements Conflicts: apps/user_ldap/ajax/clearMappings.php apps/user_ldap/appinfo/app.php apps/user_ldap/lib/access.php apps/user_ldap/lib/helper.php apps/user_ldap/tests/helper.php core/register_command.php lib/private/preferences.php lib/private/user.php add ldap:check-user to check user existance on the fly Conflicts: apps/user_ldap/lib/helper.php forgotten file PHPdoc fixes, no code change and don't forget to adjust tests
12 years ago
LDAP User Cleanup: Port from stable7 without further adjustements LDAP User Cleanup background job for user clean up adjust user backend for clean up register background job remove dead code dependency injection make Helper non-static for proper testing check whether it is OK to run clean up job. Do not forget to pass arguments. use correct method to get the config from server methods can be private, proper indirect testing is given no automatic user deletion make limit readable for test purposes make method less complex add first tests let preferences accept limit and offset for getUsersForValue DI via constructor does not work for background jobs after detecting, now we have retrieving deleted users and their details we need this method to be public for now finalize export method, add missing getter clean up namespaces and get rid of unnecessary files helper is not static anymore cleanup according to scrutinizer add cli tool to show deleted users uses are necessary after recent namespace change also remove user from mappings table on deletion add occ command to delete users fix use statement improve output big fixes / improvements PHP doc return true in userExists early for cleaning up deleted users bump version control state and interval with one config.php setting, now ldapUserCleanupInterval. 0 will disable it. enabled by default. improve doc rename cli method to be consistent with others introduce ldapUserCleanupInterval in sample config don't show last login as unix epoche start when no login happend less log output consistent namespace for OfflineUser rename GarbageCollector to DeletedUsersIndex and move it to user subdir fix unit tests add tests for deleteUser more test adjustements Conflicts: apps/user_ldap/ajax/clearMappings.php apps/user_ldap/appinfo/app.php apps/user_ldap/lib/access.php apps/user_ldap/lib/helper.php apps/user_ldap/tests/helper.php core/register_command.php lib/private/preferences.php lib/private/user.php add ldap:check-user to check user existance on the fly Conflicts: apps/user_ldap/lib/helper.php forgotten file PHPdoc fixes, no code change and don't forget to adjust tests
12 years ago
13 years ago
LDAP User Cleanup: Port from stable7 without further adjustements LDAP User Cleanup background job for user clean up adjust user backend for clean up register background job remove dead code dependency injection make Helper non-static for proper testing check whether it is OK to run clean up job. Do not forget to pass arguments. use correct method to get the config from server methods can be private, proper indirect testing is given no automatic user deletion make limit readable for test purposes make method less complex add first tests let preferences accept limit and offset for getUsersForValue DI via constructor does not work for background jobs after detecting, now we have retrieving deleted users and their details we need this method to be public for now finalize export method, add missing getter clean up namespaces and get rid of unnecessary files helper is not static anymore cleanup according to scrutinizer add cli tool to show deleted users uses are necessary after recent namespace change also remove user from mappings table on deletion add occ command to delete users fix use statement improve output big fixes / improvements PHP doc return true in userExists early for cleaning up deleted users bump version control state and interval with one config.php setting, now ldapUserCleanupInterval. 0 will disable it. enabled by default. improve doc rename cli method to be consistent with others introduce ldapUserCleanupInterval in sample config don't show last login as unix epoche start when no login happend less log output consistent namespace for OfflineUser rename GarbageCollector to DeletedUsersIndex and move it to user subdir fix unit tests add tests for deleteUser more test adjustements Conflicts: apps/user_ldap/ajax/clearMappings.php apps/user_ldap/appinfo/app.php apps/user_ldap/lib/access.php apps/user_ldap/lib/helper.php apps/user_ldap/tests/helper.php core/register_command.php lib/private/preferences.php lib/private/user.php add ldap:check-user to check user existance on the fly Conflicts: apps/user_ldap/lib/helper.php forgotten file PHPdoc fixes, no code change and don't forget to adjust tests
12 years ago
LDAP User Cleanup: Port from stable7 without further adjustements LDAP User Cleanup background job for user clean up adjust user backend for clean up register background job remove dead code dependency injection make Helper non-static for proper testing check whether it is OK to run clean up job. Do not forget to pass arguments. use correct method to get the config from server methods can be private, proper indirect testing is given no automatic user deletion make limit readable for test purposes make method less complex add first tests let preferences accept limit and offset for getUsersForValue DI via constructor does not work for background jobs after detecting, now we have retrieving deleted users and their details we need this method to be public for now finalize export method, add missing getter clean up namespaces and get rid of unnecessary files helper is not static anymore cleanup according to scrutinizer add cli tool to show deleted users uses are necessary after recent namespace change also remove user from mappings table on deletion add occ command to delete users fix use statement improve output big fixes / improvements PHP doc return true in userExists early for cleaning up deleted users bump version control state and interval with one config.php setting, now ldapUserCleanupInterval. 0 will disable it. enabled by default. improve doc rename cli method to be consistent with others introduce ldapUserCleanupInterval in sample config don't show last login as unix epoche start when no login happend less log output consistent namespace for OfflineUser rename GarbageCollector to DeletedUsersIndex and move it to user subdir fix unit tests add tests for deleteUser more test adjustements Conflicts: apps/user_ldap/ajax/clearMappings.php apps/user_ldap/appinfo/app.php apps/user_ldap/lib/access.php apps/user_ldap/lib/helper.php apps/user_ldap/tests/helper.php core/register_command.php lib/private/preferences.php lib/private/user.php add ldap:check-user to check user existance on the fly Conflicts: apps/user_ldap/lib/helper.php forgotten file PHPdoc fixes, no code change and don't forget to adjust tests
12 years ago
LDAP User Cleanup: Port from stable7 without further adjustements LDAP User Cleanup background job for user clean up adjust user backend for clean up register background job remove dead code dependency injection make Helper non-static for proper testing check whether it is OK to run clean up job. Do not forget to pass arguments. use correct method to get the config from server methods can be private, proper indirect testing is given no automatic user deletion make limit readable for test purposes make method less complex add first tests let preferences accept limit and offset for getUsersForValue DI via constructor does not work for background jobs after detecting, now we have retrieving deleted users and their details we need this method to be public for now finalize export method, add missing getter clean up namespaces and get rid of unnecessary files helper is not static anymore cleanup according to scrutinizer add cli tool to show deleted users uses are necessary after recent namespace change also remove user from mappings table on deletion add occ command to delete users fix use statement improve output big fixes / improvements PHP doc return true in userExists early for cleaning up deleted users bump version control state and interval with one config.php setting, now ldapUserCleanupInterval. 0 will disable it. enabled by default. improve doc rename cli method to be consistent with others introduce ldapUserCleanupInterval in sample config don't show last login as unix epoche start when no login happend less log output consistent namespace for OfflineUser rename GarbageCollector to DeletedUsersIndex and move it to user subdir fix unit tests add tests for deleteUser more test adjustements Conflicts: apps/user_ldap/ajax/clearMappings.php apps/user_ldap/appinfo/app.php apps/user_ldap/lib/access.php apps/user_ldap/lib/helper.php apps/user_ldap/tests/helper.php core/register_command.php lib/private/preferences.php lib/private/user.php add ldap:check-user to check user existance on the fly Conflicts: apps/user_ldap/lib/helper.php forgotten file PHPdoc fixes, no code change and don't forget to adjust tests
12 years ago
LDAP User Cleanup: Port from stable7 without further adjustements LDAP User Cleanup background job for user clean up adjust user backend for clean up register background job remove dead code dependency injection make Helper non-static for proper testing check whether it is OK to run clean up job. Do not forget to pass arguments. use correct method to get the config from server methods can be private, proper indirect testing is given no automatic user deletion make limit readable for test purposes make method less complex add first tests let preferences accept limit and offset for getUsersForValue DI via constructor does not work for background jobs after detecting, now we have retrieving deleted users and their details we need this method to be public for now finalize export method, add missing getter clean up namespaces and get rid of unnecessary files helper is not static anymore cleanup according to scrutinizer add cli tool to show deleted users uses are necessary after recent namespace change also remove user from mappings table on deletion add occ command to delete users fix use statement improve output big fixes / improvements PHP doc return true in userExists early for cleaning up deleted users bump version control state and interval with one config.php setting, now ldapUserCleanupInterval. 0 will disable it. enabled by default. improve doc rename cli method to be consistent with others introduce ldapUserCleanupInterval in sample config don't show last login as unix epoche start when no login happend less log output consistent namespace for OfflineUser rename GarbageCollector to DeletedUsersIndex and move it to user subdir fix unit tests add tests for deleteUser more test adjustements Conflicts: apps/user_ldap/ajax/clearMappings.php apps/user_ldap/appinfo/app.php apps/user_ldap/lib/access.php apps/user_ldap/lib/helper.php apps/user_ldap/tests/helper.php core/register_command.php lib/private/preferences.php lib/private/user.php add ldap:check-user to check user existance on the fly Conflicts: apps/user_ldap/lib/helper.php forgotten file PHPdoc fixes, no code change and don't forget to adjust tests
12 years ago
LDAP User Cleanup: Port from stable7 without further adjustements LDAP User Cleanup background job for user clean up adjust user backend for clean up register background job remove dead code dependency injection make Helper non-static for proper testing check whether it is OK to run clean up job. Do not forget to pass arguments. use correct method to get the config from server methods can be private, proper indirect testing is given no automatic user deletion make limit readable for test purposes make method less complex add first tests let preferences accept limit and offset for getUsersForValue DI via constructor does not work for background jobs after detecting, now we have retrieving deleted users and their details we need this method to be public for now finalize export method, add missing getter clean up namespaces and get rid of unnecessary files helper is not static anymore cleanup according to scrutinizer add cli tool to show deleted users uses are necessary after recent namespace change also remove user from mappings table on deletion add occ command to delete users fix use statement improve output big fixes / improvements PHP doc return true in userExists early for cleaning up deleted users bump version control state and interval with one config.php setting, now ldapUserCleanupInterval. 0 will disable it. enabled by default. improve doc rename cli method to be consistent with others introduce ldapUserCleanupInterval in sample config don't show last login as unix epoche start when no login happend less log output consistent namespace for OfflineUser rename GarbageCollector to DeletedUsersIndex and move it to user subdir fix unit tests add tests for deleteUser more test adjustements Conflicts: apps/user_ldap/ajax/clearMappings.php apps/user_ldap/appinfo/app.php apps/user_ldap/lib/access.php apps/user_ldap/lib/helper.php apps/user_ldap/tests/helper.php core/register_command.php lib/private/preferences.php lib/private/user.php add ldap:check-user to check user existance on the fly Conflicts: apps/user_ldap/lib/helper.php forgotten file PHPdoc fixes, no code change and don't forget to adjust tests
12 years ago
LDAP User Cleanup: Port from stable7 without further adjustements LDAP User Cleanup background job for user clean up adjust user backend for clean up register background job remove dead code dependency injection make Helper non-static for proper testing check whether it is OK to run clean up job. Do not forget to pass arguments. use correct method to get the config from server methods can be private, proper indirect testing is given no automatic user deletion make limit readable for test purposes make method less complex add first tests let preferences accept limit and offset for getUsersForValue DI via constructor does not work for background jobs after detecting, now we have retrieving deleted users and their details we need this method to be public for now finalize export method, add missing getter clean up namespaces and get rid of unnecessary files helper is not static anymore cleanup according to scrutinizer add cli tool to show deleted users uses are necessary after recent namespace change also remove user from mappings table on deletion add occ command to delete users fix use statement improve output big fixes / improvements PHP doc return true in userExists early for cleaning up deleted users bump version control state and interval with one config.php setting, now ldapUserCleanupInterval. 0 will disable it. enabled by default. improve doc rename cli method to be consistent with others introduce ldapUserCleanupInterval in sample config don't show last login as unix epoche start when no login happend less log output consistent namespace for OfflineUser rename GarbageCollector to DeletedUsersIndex and move it to user subdir fix unit tests add tests for deleteUser more test adjustements Conflicts: apps/user_ldap/ajax/clearMappings.php apps/user_ldap/appinfo/app.php apps/user_ldap/lib/access.php apps/user_ldap/lib/helper.php apps/user_ldap/tests/helper.php core/register_command.php lib/private/preferences.php lib/private/user.php add ldap:check-user to check user existance on the fly Conflicts: apps/user_ldap/lib/helper.php forgotten file PHPdoc fixes, no code change and don't forget to adjust tests
12 years ago
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud, Inc.
  4. *
  5. * @author Arthur Schiwon <blizzz@arthur-schiwon.de>
  6. * @author Brice Maron <brice@bmaron.net>
  7. * @author Christoph Wurst <christoph@winzerhof-wurst.at>
  8. * @author Joas Schilling <coding@schilljs.com>
  9. * @author Jörn Friedrich Dreyer <jfd@butonic.de>
  10. * @author Lukas Reschke <lukas@statuscode.ch>
  11. * @author Morris Jobke <hey@morrisjobke.de>
  12. * @author Roeland Jago Douma <roeland@famdouma.nl>
  13. * @author Roger Szabo <roger.szabo@web.de>
  14. * @author root <root@localhost.localdomain>
  15. * @author Thomas Müller <thomas.mueller@tmit.eu>
  16. * @author Vincent Petry <pvince81@owncloud.com>
  17. * @author Vinicius Cubas Brand <vinicius@eita.org.br>
  18. *
  19. * @license AGPL-3.0
  20. *
  21. * This code is free software: you can redistribute it and/or modify
  22. * it under the terms of the GNU Affero General Public License, version 3,
  23. * as published by the Free Software Foundation.
  24. *
  25. * This program is distributed in the hope that it will be useful,
  26. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  27. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  28. * GNU Affero General Public License for more details.
  29. *
  30. * You should have received a copy of the GNU Affero General Public License, version 3,
  31. * along with this program. If not, see <http://www.gnu.org/licenses/>
  32. *
  33. */
  34. namespace OCA\User_LDAP;
  35. use OC\Cache\CappedMemoryCache;
  36. use OCP\IConfig;
  37. class Helper {
  38. /** @var IConfig */
  39. private $config;
  40. /** @var CappedMemoryCache */
  41. protected $sanitizeDnCache;
  42. /**
  43. * Helper constructor.
  44. *
  45. * @param IConfig $config
  46. */
  47. public function __construct(IConfig $config) {
  48. $this->config = $config;
  49. $this->sanitizeDnCache = new CappedMemoryCache(10000);
  50. }
  51. /**
  52. * returns prefixes for each saved LDAP/AD server configuration.
  53. *
  54. * @param bool $activeConfigurations optional, whether only active configuration shall be
  55. * retrieved, defaults to false
  56. * @return array with a list of the available prefixes
  57. *
  58. * Configuration prefixes are used to set up configurations for n LDAP or
  59. * AD servers. Since configuration is stored in the database, table
  60. * appconfig under appid user_ldap, the common identifiers in column
  61. * 'configkey' have a prefix. The prefix for the very first server
  62. * configuration is empty.
  63. * Configkey Examples:
  64. * Server 1: ldap_login_filter
  65. * Server 2: s1_ldap_login_filter
  66. * Server 3: s2_ldap_login_filter
  67. *
  68. * The prefix needs to be passed to the constructor of Connection class,
  69. * except the default (first) server shall be connected to.
  70. *
  71. */
  72. public function getServerConfigurationPrefixes($activeConfigurations = false) {
  73. $referenceConfigkey = 'ldap_configuration_active';
  74. $keys = $this->getServersConfig($referenceConfigkey);
  75. $prefixes = [];
  76. foreach ($keys as $key) {
  77. if ($activeConfigurations && $this->config->getAppValue('user_ldap', $key, '0') !== '1') {
  78. continue;
  79. }
  80. $len = strlen($key) - strlen($referenceConfigkey);
  81. $prefixes[] = substr($key, 0, $len);
  82. }
  83. asort($prefixes);
  84. return $prefixes;
  85. }
  86. /**
  87. *
  88. * determines the host for every configured connection
  89. *
  90. * @return array an array with configprefix as keys
  91. *
  92. */
  93. public function getServerConfigurationHosts() {
  94. $referenceConfigkey = 'ldap_host';
  95. $keys = $this->getServersConfig($referenceConfigkey);
  96. $result = [];
  97. foreach ($keys as $key) {
  98. $len = strlen($key) - strlen($referenceConfigkey);
  99. $prefix = substr($key, 0, $len);
  100. $result[$prefix] = $this->config->getAppValue('user_ldap', $key);
  101. }
  102. return $result;
  103. }
  104. /**
  105. * return the next available configuration prefix
  106. *
  107. * @return string
  108. */
  109. public function getNextServerConfigurationPrefix() {
  110. $serverConnections = $this->getServerConfigurationPrefixes();
  111. if (count($serverConnections) === 0) {
  112. return 's01';
  113. }
  114. sort($serverConnections);
  115. $lastKey = array_pop($serverConnections);
  116. $lastNumber = (int)str_replace('s', '', $lastKey);
  117. return 's' . str_pad($lastNumber + 1, 2, '0', STR_PAD_LEFT);
  118. }
  119. private function getServersConfig($value) {
  120. $regex = '/' . $value . '$/S';
  121. $keys = $this->config->getAppKeys('user_ldap');
  122. $result = [];
  123. foreach ($keys as $key) {
  124. if (preg_match($regex, $key) === 1) {
  125. $result[] = $key;
  126. }
  127. }
  128. return $result;
  129. }
  130. /**
  131. * deletes a given saved LDAP/AD server configuration.
  132. *
  133. * @param string $prefix the configuration prefix of the config to delete
  134. * @return bool true on success, false otherwise
  135. */
  136. public function deleteServerConfiguration($prefix) {
  137. if (!in_array($prefix, self::getServerConfigurationPrefixes())) {
  138. return false;
  139. }
  140. $saveOtherConfigurations = '';
  141. if (empty($prefix)) {
  142. $saveOtherConfigurations = 'AND `configkey` NOT LIKE \'s%\'';
  143. }
  144. $query = \OC_DB::prepare('
  145. DELETE
  146. FROM `*PREFIX*appconfig`
  147. WHERE `configkey` LIKE ?
  148. ' . $saveOtherConfigurations . '
  149. AND `appid` = \'user_ldap\'
  150. AND `configkey` NOT IN (\'enabled\', \'installed_version\', \'types\', \'bgjUpdateGroupsLastRun\')
  151. ');
  152. $delRows = $query->execute([$prefix . '%']);
  153. if ($delRows === null) {
  154. return false;
  155. }
  156. if ($delRows === 0) {
  157. return false;
  158. }
  159. return true;
  160. }
  161. /**
  162. * checks whether there is one or more disabled LDAP configurations
  163. *
  164. * @return bool
  165. * @throws \Exception
  166. */
  167. public function haveDisabledConfigurations() {
  168. $all = $this->getServerConfigurationPrefixes(false);
  169. $active = $this->getServerConfigurationPrefixes(true);
  170. if (!is_array($all) || !is_array($active)) {
  171. throw new \Exception('Unexpected Return Value');
  172. }
  173. return count($all) !== count($active) || count($all) === 0;
  174. }
  175. /**
  176. * extracts the domain from a given URL
  177. *
  178. * @param string $url the URL
  179. * @return string|false domain as string on success, false otherwise
  180. */
  181. public function getDomainFromURL($url) {
  182. $uinfo = parse_url($url);
  183. if (!is_array($uinfo)) {
  184. return false;
  185. }
  186. $domain = false;
  187. if (isset($uinfo['host'])) {
  188. $domain = $uinfo['host'];
  189. } elseif (isset($uinfo['path'])) {
  190. $domain = $uinfo['path'];
  191. }
  192. return $domain;
  193. }
  194. /**
  195. *
  196. * Set the LDAPProvider in the config
  197. *
  198. */
  199. public function setLDAPProvider() {
  200. $current = \OC::$server->getConfig()->getSystemValue('ldapProviderFactory', null);
  201. if (is_null($current)) {
  202. \OC::$server->getConfig()->setSystemValue('ldapProviderFactory', LDAPProviderFactory::class);
  203. }
  204. }
  205. /**
  206. * sanitizes a DN received from the LDAP server
  207. *
  208. * @param array $dn the DN in question
  209. * @return array|string the sanitized DN
  210. */
  211. public function sanitizeDN($dn) {
  212. //treating multiple base DNs
  213. if (is_array($dn)) {
  214. $result = [];
  215. foreach ($dn as $singleDN) {
  216. $result[] = $this->sanitizeDN($singleDN);
  217. }
  218. return $result;
  219. }
  220. if (!is_string($dn)) {
  221. throw new \LogicException('String expected ' . \gettype($dn) . ' given');
  222. }
  223. if (($sanitizedDn = $this->sanitizeDnCache->get($dn)) !== null) {
  224. return $sanitizedDn;
  225. }
  226. //OID sometimes gives back DNs with whitespace after the comma
  227. // a la "uid=foo, cn=bar, dn=..." We need to tackle this!
  228. $sanitizedDn = preg_replace('/([^\\\]),(\s+)/u', '\1,', $dn);
  229. //make comparisons and everything work
  230. $sanitizedDn = mb_strtolower($sanitizedDn, 'UTF-8');
  231. //escape DN values according to RFC 2253 – this is already done by ldap_explode_dn
  232. //to use the DN in search filters, \ needs to be escaped to \5c additionally
  233. //to use them in bases, we convert them back to simple backslashes in readAttribute()
  234. $replacements = [
  235. '\,' => '\5c2C',
  236. '\=' => '\5c3D',
  237. '\+' => '\5c2B',
  238. '\<' => '\5c3C',
  239. '\>' => '\5c3E',
  240. '\;' => '\5c3B',
  241. '\"' => '\5c22',
  242. '\#' => '\5c23',
  243. '(' => '\28',
  244. ')' => '\29',
  245. '*' => '\2A',
  246. ];
  247. $sanitizedDn = str_replace(array_keys($replacements), array_values($replacements), $sanitizedDn);
  248. $this->sanitizeDnCache->set($dn, $sanitizedDn);
  249. return $sanitizedDn;
  250. }
  251. /**
  252. * converts a stored DN so it can be used as base parameter for LDAP queries, internally we store them for usage in LDAP filters
  253. *
  254. * @param string $dn the DN
  255. * @return string
  256. */
  257. public function DNasBaseParameter($dn) {
  258. return str_ireplace('\\5c', '\\', $dn);
  259. }
  260. /**
  261. * listens to a hook thrown by server2server sharing and replaces the given
  262. * login name by a username, if it matches an LDAP user.
  263. *
  264. * @param array $param
  265. * @throws \Exception
  266. */
  267. public static function loginName2UserName($param) {
  268. if (!isset($param['uid'])) {
  269. throw new \Exception('key uid is expected to be set in $param');
  270. }
  271. //ain't it ironic?
  272. $helper = new Helper(\OC::$server->getConfig());
  273. $configPrefixes = $helper->getServerConfigurationPrefixes(true);
  274. $ldapWrapper = new LDAP();
  275. $ocConfig = \OC::$server->getConfig();
  276. $notificationManager = \OC::$server->getNotificationManager();
  277. $userSession = \OC::$server->getUserSession();
  278. $userPluginManager = \OC::$server->query(UserPluginManager::class);
  279. $userBackend = new User_Proxy(
  280. $configPrefixes, $ldapWrapper, $ocConfig, $notificationManager, $userSession, $userPluginManager
  281. );
  282. $uid = $userBackend->loginName2UserName($param['uid']);
  283. if ($uid !== false) {
  284. $param['uid'] = $uid;
  285. }
  286. }
  287. }