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