Advertisement
Guest User

Untitled

a guest
May 30th, 2017
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.55 KB | None | 0 0
  1. <?php
  2.  
  3. include_once './includes/adLDAP.php';
  4.  
  5. if( $_SERVER['REQUEST_METHOD'] == 'POST' ) {
  6.  
  7.         $username = htmlspecialchars( $_POST['username'] );
  8.         $password = htmlspecialchars( $_POST['password'] );
  9.        
  10.         $adldap = new adLDAP();
  11.        
  12.                 $authUser = $adldap->authenticate($username, $password);
  13.             if ($authUser) {
  14.               echo "User authenticated successfully";
  15.               //hier dan dms login
  16.             }
  17.             else {
  18.               echo "User authentication unsuccessful";
  19.                 //user mag niks helemaal niks.. oftewel kan ook wel weg (misschien een redirect)
  20.             }
  21. }
  22.  
  23. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement