diff --git a/defaults/config.ini.default b/defaults/config.ini.default index 5ab81435..8ba96480 100644 --- a/defaults/config.ini.default +++ b/defaults/config.ini.default @@ -2,7 +2,7 @@ ; DO NOT EDIT THIS FILE. Instead make a config.ini file in the config folder. ; [upstream] -version = "1.1.2" ; Current upstream version of the web portal +version = "1.2.0" ; Current upstream version of the web portal repo = "https://github.com/UnityHPC/unity-web-portal" ; Upstream URL for the web portal [site] diff --git a/resources/lib/UnityLDAP.php b/resources/lib/UnityLDAP.php index 88a957f2..61371638 100644 --- a/resources/lib/UnityLDAP.php +++ b/resources/lib/UnityLDAP.php @@ -332,35 +332,4 @@ public function getOrgGroupEntry($gid) $gid = ldap_escape($gid, LDAP_ESCAPE_DN); return $this->getEntry(unityLDAP::RDN . "=$gid," . $this->STR_ORGGROUPOU); } - - public static function parseUserChildrenArray(array $userChildrenArray): array - { - // input comes from LdapEntry::getChildrenArray on a UnityUser - $output = []; - $required_string_attributes = [ - "gidnumber", - "givenname", - "homedirectory", - "loginshell", - "mail", - "o", - "sn", - "uid", - "uidnumber", - "gecos", - ]; - foreach ($required_string_attributes as $key) { - $output[$key] = $userChildrenArray[$key][0]; - } - $output["firstname"] = $output["givenname"]; - $output["lastname"] = $output["sn"]; - $output["org"] = $output["o"]; - $output["objectclass"] = $userChildrenArray["objectclass"]; - if (array_key_exists("sspublickey", $userChildrenArray)) { - $output["sshpublickey"] = $userChildrenArray["sshpublickey"]; - } else { - $output["sshpublickey"] = []; - } - return $output; - } } diff --git a/resources/templates/header.php b/resources/templates/header.php index 269a6541..b4066e6e 100644 --- a/resources/templates/header.php +++ b/resources/templates/header.php @@ -4,7 +4,7 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") { if ((@$_SESSION["is_admin"] ?? false) == true - && (@$_POST["form_name"] ?? null) == "clearView" + && (@$_POST["form_type"] ?? null) == "clearView" ) { unset($_SESSION["viewUser"]); UnitySite::redirect($CONFIG["site"]["prefix"] . "/admin/user-mgmt.php"); @@ -141,7 +141,7 @@