CLICK HERE TO BUY IT TODAY! OR GET IT FREE VIA TRIALPAY  

PHP Demo Application - Source Code

/Framework/Model/RequestHandlers/ValidateCredentials.php

<?php
/**
* Validate Security Credentials
*
* @package      Apeel_Framework_Model_RequestHandlers
* @version      1.1.0
* @author       John W. King (email: contact@apeelframework.net)
* @copyright    City Business Logic Limited 2001-2011
* @license      Dual MIT / GNU Lesser General Public License Version 3
*/

/**
* Gets username and password from the standard request object, and calls the
* validateUserCredentials(...) method of the security library.  

* Finally returns Success or Failure to the calling script.  
*/
header("Content-type: text/json; charset=iso-8859-1");
$username Apeel_Framework_Controller_Libraries_Input::request('username');
$password Apeel_Framework_Controller_Libraries_Input::request('password');
if (
Apeel_Framework_Model_Libraries_Security::validateUserCredentials($username$password)) {
    echo 
'[SUCCESS] ' APEEL_MSG_LOGIN_SUCCESSFUL;
} else {
    echo 
APEEL_MSG_LOGIN_NOT_RECOGNISED;
}
    
?>

PHP Demo Source Code Index