Code Duplication    Length = 14-14 lines in 2 locations

cloudcontrol/library/storage/Storage.php 2 locations

@@ 89-102 (lines=14) @@
86
		 *
87
		 * @return array
88
		 */
89
		public function getUserByUsername($username)
90
		{
91
			$return = array();
92
93
			$users = $this->repository->users;
94
			foreach ($users as $user) {
95
				if ($user->username == $username) {
96
					$return = $user;
97
					break;
98
				}
99
			}
100
101
			return $return;
102
		}
103
104
		/**
105
		 * Get user by slug
@@ 111-124 (lines=14) @@
108
		 *
109
		 * @return array
110
		 */
111
		public function getUserBySlug($slug)
112
		{
113
			$return = array();
114
115
			$users = $this->repository->users;
116
			foreach ($users as $user) {
117
				if ($user->slug == $slug) {
118
					$return = $user;
119
					break;
120
				}
121
			}
122
123
			return $return;
124
		}
125
126
		/**
127
		 * Get all users