summaryrefslogtreecommitdiffstats
path: root/pam.php
diff options
context:
space:
mode:
Diffstat (limited to 'pam.php')
-rw-r--r--pam.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/pam.php b/pam.php
new file mode 100644
index 0000000..c5cb8fb
--- /dev/null
+++ b/pam.php
@@ -0,0 +1,22 @@
+<?php
+
+// Autoload classes from ./inc which adhere to naming scheme <lowercasename>.inc.php
+function slxAutoloader($class)
+{
+ $file = 'inc/' . preg_replace('/[^a-z0-9]/', '', mb_strtolower($class)) . '.inc.php';
+ if (!file_exists($file))
+ return;
+ require_once $file;
+}
+spl_autoload_register('slxAutoloader');
+
+require_once 'config.php';
+
+Header('Content-Type: text/plain; charset=utf-8');
+
+$res = Database::simpleQuery("SELECT suffix, authmethod FROM organization INNER JOIN organization_suffix USING(organizationid)");
+while ($row = $res->fetch(PDO::FETCH_ASSOC)) {
+ if (substr($row['authmethod'], 0, 5) === 'https') {
+ echo $row['suffix'], '=', $row['authmethod'], "\n";
+ }
+}