Skip to content
Snippets Groups Projects
Commit b7f34edc authored by Olav Morken's avatar Olav Morken
Browse files

UserPass(Org)Base: Add support for presetting the username and organization.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2001 44740490-163a-0410-bde0-09ae8108e29a
parent 9834a6e7
No related branches found
No related tags found
No related merge requests found
......@@ -20,6 +20,8 @@ $state = SimpleSAML_Auth_State::loadState($authStateId, sspmod_core_Auth_UserPas
if (array_key_exists('username', $_REQUEST)) {
$username = $_REQUEST['username'];
} elseif (isset($state['core:username'])) {
$username = (string)$state['core:username'];
} else {
$username = '';
}
......@@ -30,7 +32,7 @@ if (array_key_exists('password', $_REQUEST)) {
$password = '';
}
if (!empty($username) || !empty($password)) {
if (!empty($_REQUEST['username']) || !empty($password)) {
/* Either username or password set - attempt to log in. */
if (array_key_exists('forcedUsername', $state)) {
......
......@@ -18,6 +18,8 @@ $organizations = sspmod_core_Auth_UserPassOrgBase::listOrganizations($authStateI
if (array_key_exists('username', $_REQUEST)) {
$username = $_REQUEST['username'];
} elseif (isset($state['core:username'])) {
$username = (string)$state['core:username'];
} else {
$username = '';
}
......@@ -30,6 +32,8 @@ if (array_key_exists('password', $_REQUEST)) {
if (array_key_exists('organization', $_REQUEST)) {
$organization = $_REQUEST['organization'];
} elseif (isset($state['core:organization'])) {
$organization = (string)$state['core:organization'];
} else {
$organization = '';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment