Code Duplication    Length = 11-11 lines in 2 locations

lib/private/user/database.php 2 locations

@@ 94-104 (lines=11) @@
91
	 *
92
	 * Deletes a user
93
	 */
94
	public function deleteUser($uid) {
95
		// Delete user-group-relation
96
		$query = OC_DB::prepare('DELETE FROM `*PREFIX*users` WHERE `uid` = ?');
97
		$result = $query->execute(array($uid));
98
99
		if (isset($this->cache[$uid])) {
100
			unset($this->cache[$uid]);
101
		}
102
103
		return $result ? true : false;
104
	}
105
106
	/**
107
	 * Set password
@@ 133-143 (lines=11) @@
130
	 *
131
	 * Change the display name of a user
132
	 */
133
	public function setDisplayName($uid, $displayName) {
134
		if ($this->userExists($uid)) {
135
			$query = OC_DB::prepare('UPDATE `*PREFIX*users` SET `displayname` = ? WHERE LOWER(`uid`) = LOWER(?)');
136
			$query->execute(array($displayName, $uid));
137
			$this->cache[$uid]['displayname'] = $displayName;
138
139
			return true;
140
		}
141
142
		return false;
143
	}
144
145
	/**
146
	 * get display name of the user