diff --git a/dbschema/createDummyUser.sql b/dbschema/createDummyUser.sql
new file mode 100644
index 0000000000000000000000000000000000000000..e578511f6f5df1bf7e62c2c23bcb2a2ec8c01bca
--- /dev/null
+++ b/dbschema/createDummyUser.sql
@@ -0,0 +1,34 @@
+
+drop TABLE `users`;
+
+CREATE TABLE `users` (
+  `name` varchar(400) NOT NULL,
+  `password` varchar(200) NOT NULL,
+  `email` varchar(400) NOT NULL,
+  `token` varchar(800) NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+
+INSERT INTO `users` (`name`, `password`, `email`, `token`) VALUES
+  ('teststudent1', 'egal', 'test1@uni.de', 'test1');
+
+INSERT INTO `users` (`name`, `password`, `email`, `token`) VALUES
+  ('teststudent1', 'egal', 'test1@uni.de', 'test1');
+
+INSERT INTO `users` (`name`, `password`, `email`, `token`) VALUES
+  ('teststudent2', 'egal', 'test2@uni.de', 'test2');
+
+INSERT INTO `users` (`name`, `password`, `email`, `token`) VALUES
+  ('teststudent3', 'egal', 'test3@uni.de', 'test3');
+
+INSERT INTO `users` (`name`, `password`, `email`, `token`) VALUES
+  ('teststudent4', 'egal', 'test4@uni.de', 'test4');
+
+INSERT INTO `users` (`name`, `password`, `email`, `token`) VALUES
+  ('teststudent5', 'egal', 'test5@uni.de', 'test5');
+
+INSERT INTO `users` (`name`, `password`, `email`, `token`) VALUES
+  ('teststudent6', 'egal', 'test6@uni.de', 'test6');
+
+INSERT INTO `users` (`name`, `password`, `email`, `token`) VALUES
+  ('teststudent7', 'egal', 'test7@uni.de', 'test7');
diff --git a/dbschema/fltrail.sql b/dbschema/fltrail.sql
index cc3cb5e1e3156f3113b13f2725e4724f175b85f1..8c364d3ed4df5eaab55c6c44614290fb0b27d687 100644
--- a/dbschema/fltrail.sql
+++ b/dbschema/fltrail.sql
@@ -31,12 +31,8 @@ CREATE TABLE `users` (
   `token` varchar(800) NOT NULL
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
-INSERT INTO `users` (`name`, `password`, `email`, `token`) VALUES
-('Axel Wiepke', 'password', 'wiepke@uni.de', '5ab0f28f75d23');
 
 
-ALTER TABLE `users`
-  ADD UNIQUE KEY `password` (`password`);
 
 /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
 /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
diff --git a/studentview/assets/js/myGroupsInit.js b/studentview/assets/js/myGroupsInit.js
index a084ff91176d4316d228d449983c5cd8ebb791de..7844d796c31cef23090884908c5f9420b1f12bd6 100644
--- a/studentview/assets/js/myGroupsInit.js
+++ b/studentview/assets/js/myGroupsInit.js
@@ -47,6 +47,9 @@ function getProjects(user) {
 
 function printGroupTable(student1, student2, student3, student4) {
     var innerurl = "../database/getAdresses.php?student1=" + student1 + "&student2=" + student2 + "&student3=" + student3 + "&student4=" + student4;
+    /*if (student4) {
+        innerurl = innerurl + "&student4=" + student4;
+    }*/
     $.ajax({                    //get email adresses in this ajax.
         student1: "" + student1,
         student2: "" + student2,
diff --git a/studentview/database/getAdresses.php b/studentview/database/getAdresses.php
index aaaf770653f82c5cd6285e43a6ab1a6343aca72b..c3870fc2484ac10243f21b0aa5834846ae52aca5 100644
--- a/studentview/database/getAdresses.php
+++ b/studentview/database/getAdresses.php
@@ -10,29 +10,59 @@ include_once 'config.php';
 
 $student1 = $_GET['student1'];
 $student2 = $_GET['student2'];
-if (isset($_GET['student3'])) {
-    $student3 = $_GET['student3'];
-} else{$student3 = "";}
-if (isset($_GET['student4'])) {
-    $student4 = $_GET['student4'];
-}else {$student4 = "";}
-if (isset($_GET['student5'])) {
-    $student5 = $_GET['student5'];
-}else {$student5 = "";}
-$adresses = array();
+$student3 = $_GET['student3'];
+
+$addresses = array();
 
 if (!$db) {
     die('Could not connect: ' . mysqli_error($db));
 }
 
 mysqli_select_db($db, "fltrail");
-$sql = "SELECT name,email FROM `users` WHERE `name`='".$student1."' OR `name` = '".$student2."' OR `name` = '".$student3."' OR `name` = '".$student4."';";
+$sql = "SELECT name,email FROM `users` WHERE `name`='".$student1."' OR `name` = '".$student2."' OR `name` = '".$student3."'";
+
+if (isset($_GET['student4'])) {
+    $sql = $sql . "OR `name` = '".$_GET['student4']."';";
+} else {
+    $sql = $sql . ";";
+}
+
 if ($result = mysqli_query($db, $sql)) {
     while ($row = mysqli_fetch_array($result)) {
-        $adresses[] = $row;
+            $addresses[] = $row;
+    }
+}
+
+function filter ($arrayelem) {
+    return array($arrayelem[0], $arrayelem[1]);
+};
+
+$addresses = array_map('filter', $addresses);
+
+$students = array($student1, $student2, $student3);
+if (isset($_GET['student4']) && $_GET['student4'] != "undefined" ) {
+    $students = array($student1, $student2, $student3, $_GET['student4']);
+}
+
+function attributeEmail($studentName, $addresses) {
+    foreach ($addresses as $value) {
+        if ($value[0] == $studentName) {
+            return $value[1];
+        }
+    }
+}
+
+
+$finalArray = array();
+
+foreach ($students as $student) {
+    $email = attributeEmail($student, $addresses);
+    if (!$email) {
+        $email = "";
     }
+    array_push($finalArray, array("name" => $student, "email" => $email));
 }
 
-echo json_encode($adresses);
+echo json_encode($finalArray);
 mysqli_close($db);
 ?>
\ No newline at end of file