just extend the existing Auth Component and override the method that is responsible for the login part
that's how i did it On 5 Jun., 07:14, John Andersen <j.andersen...@gmail.com> wrote: > Follow-up, on the second part of your question, displaying a specific > message based on which criteria is not fulfilled! > I don't know, sorry for that! > John > > On Jun 5, 8:12 am, John Andersen <j.andersen...@gmail.com> wrote: > > > Having looked at the AuthComponent code, the answer is Yes! > > Your conditions in the userScope attribute will be used as the > > condition in a model->find method, when retrieving the user > > information! > > Enjoy, > > John > > > On Jun 4, 7:50 pm, "Dave Maharaj :: WidePixels.com" > > > <d...@widepixels.com> wrote: > > > When a user logs in I check > > > $this->Auth->userScope = array('User.confirmed' => '1'); > > > so they have to have confirmed their account email sign up. > > > > If not they simply can not login. > > > > BUT.... > > > > How can I display a specific message to the user explaining why they > > > cannot > > > login? I will be adding to the scope a second variable > > > $this->Auth->userScope = array('User.confirmed' => '1', User.status =>1); > > > where confirmed can be 0 or 1 but status can be 0, 1, or 2 > > > 0= pending => message "Your account is pending administrative approval" > > > 1=active => allow login > > > 2=banned => message "Your account suspended pending review" > > > > Is this possible? > > > > Dave --~--~---------~--~----~------------~-------~--~----~ 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 cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---