From df3881183b33fa57a5683224d5798f1efd56dad2 Mon Sep 17 00:00:00 2001
From: Jan van Haarst <jan.vanhaarst@wur.nl>
Date: Mon, 16 Aug 2021 11:34:20 +0200
Subject: [PATCH] Convert username and supervisor to lower case.

---
 create_new_user.sh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/create_new_user.sh b/create_new_user.sh
index c7714cf..83cf4b0 100755
--- a/create_new_user.sh
+++ b/create_new_user.sh
@@ -1,6 +1,7 @@
 #!/bin/bash
 SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
 
+
 set -o nounset
 set -o errexit
 
@@ -12,6 +13,7 @@ fi
 
 # Variables
 NEW_USER=${1}
+NEW_USER="${NEW_USER,,}"
 ADMINPASSWORD=''
 binddn=${SUDO_USER}@wurnet.nl
 declare -A DN_ARRAY
@@ -125,6 +127,7 @@ fi
 if [ "$STUDENT" == "Y" ]
 then 
     read -p "Who is the supervisor of $NEW_USER ? " SUPERVISOR
+    SUPERVISOR="${SUPERVISOR,,}"
     read -p "What is the end date for access for $NEW_USER ? [${DEFAULT_END_DATE}] " END_DATE
     END_DATE=${END_DATE:-${DEFAULT_END_DATE}}
     echo
-- 
GitLab