Code Duplication    Length = 11-11 lines in 2 locations

lib/private/User/Database.php 2 locations

@@ 124-134 (lines=11) @@
121
	 *
122
	 * Deletes a user
123
	 */
124
	public function deleteUser($uid) {
125
		// Delete user-group-relation
126
		$query = \OC_DB::prepare('DELETE FROM `*PREFIX*users` WHERE `uid` = ?');
127
		$result = $query->execute(array($uid));
128
129
		if (isset($this->cache[$uid])) {
130
			unset($this->cache[$uid]);
131
		}
132
133
		return $result ? true : false;
134
	}
135
136
	/**
137
	 * Set password
@@ 167-177 (lines=11) @@
164
	 *
165
	 * Change the display name of a user
166
	 */
167
	public function setDisplayName($uid, $displayName) {
168
		if ($this->userExists($uid)) {
169
			$query = \OC_DB::prepare('UPDATE `*PREFIX*users` SET `displayname` = ? WHERE LOWER(`uid`) = LOWER(?)');
170
			$query->execute(array($displayName, $uid));
171
			$this->cache[$uid]['displayname'] = $displayName;
172
173
			return true;
174
		}
175
176
		return false;
177
	}
178
179
	/**
180
	 * get display name of the user