Fix more saml vs internal switches, messages, errors. Allow empty user perms.

This commit is contained in:
2021-05-07 15:57:31 -04:00
parent 37806023dc
commit 4ce405ca75
4 changed files with 64 additions and 5 deletions

View File

@@ -79,6 +79,9 @@
require_once("inc/header.inc.php");
if ($StaticFunctions->getUserSessionStatus() == false) { // CHECK STATUS
?>
<!-- GUEST CONTENT START -->
<div class="jumbotron">
@@ -120,6 +123,41 @@
<?php
} else {
?>
<?php
//on login see if user name fields are set and if not copy from saml when using saml, and then reload
if (Registry::AUTHMETHOD == 'SAML') {
if ($StaticFunctions->getUserSessionStatus() == true) {
if (empty($Users->getUserInitials($uid)[0]["users_lastname"])) {
$Users->updateSAMLName($uid, $attributes['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname'][0], $attributes['http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname'][0]);
?>
<div class="jumbotron">
<div class="container">
<div class="row">
<div class="col-sm">
&nbsp;
</div>
<div class="col-sm">
<a class="btn btn-outline-success btn-lg btn-block" tabindex="-1" role="button" aria-disabled="true" href="index.php"><?php echo $transLang['REFRESH']; ?></a>
</div>
<div class="col-sm">
&nbsp;
</div>
</div>
</div>
</div>
<?php
die;
}
}
}
?>
<!-- USER CONTENT START -->
<?php
$post_outtime = filter_input(INPUT_POST, 'outtime');