request->getData('ldap'); $password = $this->request->getData('password'); // return user or FALSE // calls /Model/Table/LdapConnectionsTable.php/ldapAuthentication() return TableRegistry::getTableLocator()->get('LdapConnections')->ldapAuthentication($login, $password); //return TableRegistry::get('LdapConnections')->ldapAuthentication($login, $password); } catch (Exception $e) { var_dump($e->getMessage()); //return $e->getMessage(); return FALSE; } } } ?>