Authentication working with LDAP

This commit is contained in:
paolo
2016-04-11 17:23:51 +02:00
parent 55187700c2
commit 7032d8be7f
4 changed files with 16 additions and 13 deletions
+51
View File
@@ -0,0 +1,51 @@
<?php
/**
* FH-Complete
*
* @package FHC-Helper
* @author FHC-Team
* @copyright Copyright (c) 2016 fhcomplete.org
* @license GPLv3
* @link https://fhcomplete.org
* @since Version 1.0.0
* @filesource
*/
defined('BASEPATH') OR exit('No direct script access allowed');
require_once FCPATH.'include/authentication.class.php';
/**
* FHC-Auth Helpers
*
* @package FH-Complete
* @subpackage Helpers
* @category Helpers
* @author FHC-Team
* @link http://fhcomplete.org/user_guide/helpers/fhcauth_helper.html
*/
// ------------------------------------------------------------------------
class Fhcauth
{
/**
* Auth Username, Password over FH-Complete
*
* @param string $username
* @param string $password
* @return bool
*/
function auth($username, $password)
{
$auth = new authentication();
if ($auth->checkpassword($username, $password))
{
//echo 'Auth-Method-True';
return true;
}
else
{
//echo 'Auth-Method-False';
return false;
}
}
}