Code Duplication    Length = 8-11 lines in 2 locations

lib/private/User/Manager.php 2 locations

@@ 206-213 (lines=8) @@
203
		$loginName = str_replace("\0", '', $loginName);
204
		$password = str_replace("\0", '', $password);
205
206
		foreach ($this->backends as $backend) {
207
			if ($backend->implementsActions(Backend::CHECK_PASSWORD)) {
208
				$uid = $backend->checkPassword($loginName, $password);
209
				if ($uid !== false) {
210
					return $this->getUserObject($uid, $backend);
211
				}
212
			}
213
		}
214
215
		return false;
216
	}
@@ 284-294 (lines=11) @@
281
	 */
282
	public function createUser($uid, $password) {
283
		$localBackends = [];
284
		foreach ($this->backends as $backend) {
285
			if ($backend instanceof Database) {
286
				// First check if there is another user backend
287
				$localBackends[] = $backend;
288
				continue;
289
			}
290
291
			if ($backend->implementsActions(Backend::CREATE_USER)) {
292
				return $this->createUserFromBackend($uid, $password, $backend);
293
			}
294
		}
295
296
		foreach ($localBackends as $backend) {
297
			if ($backend->implementsActions(Backend::CREATE_USER)) {