diff options
author | Ermal Luçi <eri@pfsense.org> | 2010-03-09 17:54:00 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2010-03-09 17:54:00 +0000 |
commit | fb0f22c0ec9b86c79b9623d6b710a5f47741b3b6 (patch) | |
tree | aace734ee851d5927f5a5337c2a2ad96326da5b5 /usr/local/www/diag_authentication.php | |
parent | 61bda182d488e9a713d5963d93e6f646bf851f87 (diff) | |
download | pfsense-fb0f22c0ec9b86c79b9623d6b710a5f47741b3b6.zip pfsense-fb0f22c0ec9b86c79b9623d6b710a5f47741b3b6.tar.gz |
Add a function to get user groups based on authentication server. Use this function to show the groups the user i member of on Diag Authentication.
Diffstat (limited to 'usr/local/www/diag_authentication.php')
-rwxr-xr-x | usr/local/www/diag_authentication.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/usr/local/www/diag_authentication.php b/usr/local/www/diag_authentication.php index f579da9..82bb4eb 100755 --- a/usr/local/www/diag_authentication.php +++ b/usr/local/www/diag_authentication.php @@ -56,10 +56,16 @@ if ($_POST) { $input_errors[] = "A valid username and password must be specified."; if (!$input_errors) { - if (authenticate_user($_POST['username'], $_POST['password'], $authcfg)) - $savemsg = "User authenticated sucessfully."; - else + if (authenticate_user($_POST['username'], $_POST['password'], $authcfg)) { + $savemsg = "User: {$_POST['username']} authenticated sucessfully."; + $groups = getUserGroups($_POST['username'], $authcfg); + $savemsg .= "<br />This user is member of this groups: <br />"; + foreach ($groups as $group) + $savemsg .= "{$group} "; + } else { + var_dump($authcfg); $input_errors[] = "User did not authenticate succesfully."; + } } } $pgtitle = array("Diagnostics","Authentication"); |