So your user model is Login? Once a user (Login) has successfully authenticated, the Auth->user() method will return the data for that user:
debug($this->Auth->user()); On Fri, Jun 15, 2012 at 6:11 AM, sneha kulkarni <[email protected]> wrote: > function login() { > > if(!empty($this->data)) { > > $dbuser = > $this->Login->findByUsername($this->data['Login']['username']); > > if(!empty($dbuser) && ($dbuser['Login']['password'] == > ($this->data['Login']['password']))) { > > > $this->redirect('/logins/main_home_k'); > > } else { > > > $this->redirect('/logins/error'); > > } > > } > } > > On Fri, Jun 15, 2012 at 3:16 PM, Chetan Patel <[email protected]> > wrote: >> >> Hello sneha >> >> Please share your login action or other code here >> >> On Fri, Jun 15, 2012 at 3:13 PM, sneha kulkarni >> <[email protected]> wrote: >>> >>> hi i m new in cakephp. >>> when user login i want to fetch branch name field value in variable >>> from logins table of that particular user to compaire by if else >>> condition..but i will not able to do this in my login function.. >>> >>> -- >>> Our newest site for the community: CakePHP Video Tutorials >>> http://tv.cakephp.org >>> Check out the new CakePHP Questions site http://ask.cakephp.org and help >>> others with their CakePHP related questions. >>> >>> >>> To unsubscribe from this group, send email to >>> [email protected] For more options, visit this group >>> at http://groups.google.com/group/cake-php >> >> >> -- >> Our newest site for the community: CakePHP Video Tutorials >> http://tv.cakephp.org >> Check out the new CakePHP Questions site http://ask.cakephp.org and help >> others with their CakePHP related questions. >> >> >> To unsubscribe from this group, send email to >> [email protected] For more options, visit this group >> at http://groups.google.com/group/cake-php > > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check out the new CakePHP Questions site http://ask.cakephp.org and help > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > [email protected] For more options, visit this group at > http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
