diff --git a/www/admin/brukere/index.php b/www/admin/brukere/index.php
index 04d96c7..8584f02 100644
--- a/www/admin/brukere/index.php
+++ b/www/admin/brukere/index.php
@@ -69,10 +69,10 @@ $users = $userManager->getAllUserData();
?>
- = $uname; ?> |
+ = $uname ?> |
usergroups as $name => $group){
- echo '' . $name . ' | ';
+ echo '' . $name . ' | ';
}
?>
@@ -80,6 +80,15 @@ $users = $userManager->getAllUserData();
+
+
+ |
+ usergroups as $name => $group){
+ echo '' . $name . ' | ';
+ }
+ ?>
+
diff --git a/www/admin/brukere/update.php b/www/admin/brukere/update.php
index 5c1d352..3a41ea6 100644
--- a/www/admin/brukere/update.php
+++ b/www/admin/brukere/update.php
@@ -20,10 +20,28 @@ if(!$userManager->isAdmin($uname)){
exit();
}
+$newUser;
+if(isset($_POST['newuser'])){
+ $newUser = $_POST['newuser'];
+}
+
// 2d array of usernames and their corresponding group flags
$userFlags = [];
foreach($_POST as $namegroup => $check){
+ // new user field, don't use that
+ if($namegroup == 'newuser'){
+ continue;
+ }
+
$data = explode('_', $namegroup);
+ if($data[0] == 'newuser'){
+ if(!$newUser){
+ continue;
+ }
+
+ $data[0] = $newUser;
+ }
+
if(!isset($userFlags[$data[0]])){
$userFlags[$data[0]] = 0;
}
diff --git a/www/css/admin.css b/www/css/admin.css
index 16e241d..89649e9 100644
--- a/www/css/admin.css
+++ b/www/css/admin.css
@@ -136,3 +136,21 @@ header.admin {
border-bottom: 1px solid gray;
min-width: 100%;
}
+
+.usergroupcheckbox {
+ margin-right: .3em;
+}
+
+.newuserrow {
+ background-color: #ddd;
+}
+
+.newuserelement {
+ background-color: #ddd;
+ border-bottom: 2px dotted gray;
+}
+
+.newuserelement input {
+ border: none;
+ background-color: #ddd;
+}
\ No newline at end of file