Fix saml vs internal user add
This commit is contained in:
parent
bb9bdd7056
commit
37806023dc
@ -178,6 +178,8 @@
|
||||
header('Location: ' . $_SERVER['PHP_SELF']);
|
||||
endif;
|
||||
|
||||
|
||||
if (Registry::AUTHMETHOD == 'INTERNAL') {
|
||||
if (!empty($_POST['newuser'])): // NEW USER INTERNAL
|
||||
require_once("src/Misc/PasswordHash.php");
|
||||
if (empty($_POST['username'])): $errors['username'] = $transLang['USERNAME_NOTEMPTY']; endif;
|
||||
@ -200,6 +202,8 @@
|
||||
$Users->addUser($_POST['firstname'], $_POST['lastname'], $_POST['username'], $timezone, $password, $_POST['email'], $_POST['usertype']);
|
||||
header('Location: ' . $_SERVER['PHP_SELF']);
|
||||
endif;
|
||||
} elseif (Registry::AUTHMETHOD == 'SAML') {
|
||||
|
||||
|
||||
if (!empty($_POST['newuser'])): // NEW USER SAML
|
||||
$email = filter_var($_POST['email'], FILTER_VALIDATE_EMAIL);
|
||||
@ -213,7 +217,7 @@
|
||||
$Users->addSAMLUser($timezone, $_POST['email'], $_POST['usertype']);
|
||||
header('Location: ' . $_SERVER['PHP_SELF']);
|
||||
endif;
|
||||
|
||||
};
|
||||
|
||||
if (!empty($_POST['editusercomplete'])): // EDIT USER
|
||||
require_once("src/Misc/PasswordHash.php");
|
||||
|
Loading…
Reference in New Issue
Block a user