I have added a piece of code in template file phpfn.php (v10). i.e.
<!--## If ew_Val(PROJ.GetV("IsLDAPEnabled")) { ##-->
// User LDAP Validate event
function LDAP_UserValidate(&$usr, &$pwd) {
//logic
}
<!--## } ##-->
and after when I generate the project file PHPMaker throws the following error
PHPMaker: Generate phpmkrfn page error
PHPMaker (ewExphpmkrfn):(0)