X-Git-Url: https://git.p6c8.net/jirafeau_mojo42.git/blobdiff_plain/17d5977bf8d24a1b0abb5f52a8453322f21a994d..6d2f72029699314db90926f57861154ae76d3852:/index.php?ds=inline diff --git a/index.php b/index.php index b6dac09..f60c37d 100644 --- a/index.php +++ b/index.php @@ -40,14 +40,60 @@ if (isset($_POST['action']) && (strcmp($_POST['action'], 'logout') == 0)) { } /* Check if user is allowed to upload. */ -// First check: Is user already logged +// check if user already logged if (jirafeau_user_session_logged()) { } -// Second check: Challenge by IP NO PASSWORD +// check of ldap authentication +elseif (jirafeau_has_ldap_auth($cfg)) { + if (isset($_POST['ldap_user']) and isset($_POST['ldap_password'])) { + $result = jirafeau_challenge_ldap_auth($cfg, $_POST['ldap_user'], $_POST['ldap_password']); + if (true === $result) { + jirafeau_user_session_start(); + } else { + jirafeau_session_end(); + jirafeau_non_fatal_error(t('BAD_PSW')); + } + } + // Show login form if user session is not authorized yet + if (!jirafeau_user_session_logged()) { + ?> +
+
+ + + + + + + + + + + + +
+
+ +
+
+ +
+
+
+