Hi, there is a article on bakery about using ldap, in theory you would replace you users table with a link to ldap and you wont need to change anything in auth.
and all user information will be store in ldap On 23 Oct, 22:10, Nathaniel Price <[EMAIL PROTECTED]> wrote: > I'd like to extend the Auth component in such a way as to be able to > use LDAP to log users in; basically, my approach would be to > authenticate the user via LDAP, then, if the user is valid and > properly authenticated, it would put them into the user database that > Auth uses and would hand control back to Auth from there. It looks > something like this: > > <?php > App::import('Component', 'Auth'); > > class LdapAuth extends Auth { > var $ldapModel = 'LdapUser'; > > function startup(&$controller) { > $username = > $controller->data[$this->userModel][$this->fields['username']]; > > $password = $controller->data[$this->userModel][$this- > > >fields['password']]; > > $res = $this->preauthUser($username, $password); > > if (!$res) { > //set password to blank to ensure the auth fails > > $controller->data[$this->userModel][$this->fields['password']] = > ''; > } > //Continue with standard auth process > return parent::startup($controller); > } > > //... rest of class here} > > ?> > > However, when I try to use this component in my pages, I get the > following error: > Fatal error: Class 'Auth' not found in C:\...\app\controllers > \components\ldap_auth.php on line 4 > > Is there something I'm doing wrong that makes it so that Auth isn't > included in my file? I thought App::import() would take care of that, > but apparently it's not. > > Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---