summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local')
-rwxr-xr-xusr/local/www/diag_authentication.php12
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");
OpenPOWER on IntegriCloud