Code Duplication    Length = 8-11 lines in 2 locations

lib/private/User/Manager.php 2 locations

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