Code Duplication    Length = 14-14 lines in 2 locations

cloudcontrol/library/storage/storage/UsersStorage.php 2 locations

@@ 30-43 (lines=14) @@
27
	 *
28
	 * @return array
29
	 */
30
	public function getUserBySlug($slug)
31
	{
32
		$return = array();
33
34
		$users = $this->repository->users;
35
		foreach ($users as $user) {
36
			if ($user->slug == $slug) {
37
				$return = $user;
38
				break;
39
			}
40
		}
41
42
		return $return;
43
	}
44
45
	/**
46
	 * Save user
@@ 124-137 (lines=14) @@
121
	 *
122
	 * @return array
123
	 */
124
	public function getUserByUsername($username)
125
	{
126
		$return = array();
127
128
		$users = $this->repository->users;
129
		foreach ($users as $user) {
130
			if ($user->username == $username) {
131
				$return = $user;
132
				break;
133
			}
134
		}
135
136
		return $return;
137
	}
138
}