OK, thanks, got it. Thomas
On Jan 7, 2:03 pm, Martin Westin <[email protected]> wrote: > Hi, > The basic definition of the table schema is available in the Cookbook. > You can add whatever else you want to the table (full name, > address...)http://book.cakephp.org/view/172/Authentication > > The model code "requires" nothing at all, but you probably want to add > some of your own validations and any methods and callbacks needed to > support associations, extra fields you define for the User model and > so on. But the things directly affecting Authentication does not > require any special code in your model. > > Auth keeps a set of defaults for everything you MAY wish to configure. > The code you have extracted is where the default login action is > defined as "controller is the plural name of model used and the action > is called login" (/users/login). It looks a bit complicated since you > can decide that Auth should use the model Account (or anything you > like) and in that case the default login action would be /accounts/ > login. > You can override this by calling: $this->Auth->loginAction = '/ > anything/you/like'; > > /Martin > > On Jan 7, 7:25 pm, 703designs <[email protected]> wrote: > > > OK. I know that the 'password'-related methods expect a sha1'd or > > md5'd CHAR(40) field, and I thought that this corresponded with a > > basic model definition somewhere. > > > Could you help me to understand what this craziness is? I think that > > know what it does (expects the login() method in UsersController), but > > I'd like to know _how_ it does it. "..." indicates omitted code. > > > class AuthComponent extends Object { > > ... > > function __setDefaults() { > > ... > > // This is the part that interests me > > $defaults = array( > > 'loginAction' => Router::normalize(array( > > 'controller'=> Inflector::underscore(Inflector::pluralize > > ($this->userModel)), > > 'action' => 'login' > > )), > > ... > > ); > > ... > > > } > > > Thanks, > > Thomas > > > On Jan 7, 12:53 pm, brian <[email protected]> wrote: > > > > There is no default User model. You need to create that yourself. Set > > > that up however you'd like and then add login, logout, etc. methods > > > for the Auth component. > > > > I'll leave it to someone else to go over the benefits of Auth. > > > > On Wed, Jan 7, 2009 at 11:35 AM, 703designs <[email protected]> > > > wrote: > > > > > I just began working with the Auth component, and I would like to know > > > > what it provides for me and what I will have to provide on my own. > > > > When I'm used to the process of defining my own models, etc. it's > > > > somewhat disorienting to simply add a $form->create(), inputs(), and > > > > end() to create a login page. > > > > > Where can I see the default User model? How do you recommend I go > > > > about extending this model (to have other user data such as email, > > > > phone, etc.)? My other questions will probably be based on what I > > > > found out from this question. Thanks! > > > > > Thomas > > > > Novice Cake Baker > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
