Re: Using Auth component with two different models
On Tue, Apr 23, 2013 at 7:26 PM, André Luis cavall...@live.com wrote: I suggest to use a single model and separate the users using groups... Thanks André - best plan I think. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Using Auth component with two different models
set the userModel and set $sessionKey as $sessionKey = 'Auth.YourModelName'; then you can separate your log-in sessions and login with models respectively. 2013/4/23 Alex Bovey a...@bovey.co.uk On Fri, Apr 19, 2013 at 4:39 PM, Alex Bovey a...@bovey.co.uk wrote: Hi all, What's the best technique to use if I have two separate areas of my site and I want the Auth component to use two separate models to log in to those areas? I have tried setting the $this-Auth-authenticate['Form']['userModel'] from the controller but that doesn't seem to have any effect... Hi all - any thoughts on this one? Thanks! Alex -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Using Auth component with two different models
sorry, let me correct, it should be: AuthComponent::$sessionKey = 'Auth.YourModelName'; 2013/4/23 Irvin Huang tfir...@gmail.com set the userModel and set $sessionKey as $sessionKey = 'Auth.YourModelName'; then you can separate your log-in sessions and login with models respectively. 2013/4/23 Alex Bovey a...@bovey.co.uk On Fri, Apr 19, 2013 at 4:39 PM, Alex Bovey a...@bovey.co.uk wrote: Hi all, What's the best technique to use if I have two separate areas of my site and I want the Auth component to use two separate models to log in to those areas? I have tried setting the $this-Auth-authenticate['Form']['userModel'] from the controller but that doesn't seem to have any effect... Hi all - any thoughts on this one? Thanks! Alex -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out. -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Using Auth component with two different models
On Fri, Apr 19, 2013 at 4:39 PM, Alex Bovey a...@bovey.co.uk wrote: Hi all, What's the best technique to use if I have two separate areas of my site and I want the Auth component to use two separate models to log in to those areas? I have tried setting the $this-Auth-authenticate['Form']['userModel'] from the controller but that doesn't seem to have any effect... Hi all - any thoughts on this one? Thanks! Alex -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: Using Auth component with two different models
I suggest to use a single model and separate the users using groups... Em sexta-feira, 19 de abril de 2013 12h39min38s UTC-3, Alex Bovey escreveu: Hi all, What's the best technique to use if I have two separate areas of my site and I want the Auth component to use two separate models to log in to those areas? I have tried setting the $this-Auth-authenticate['Form']['userModel'] from the controller but that doesn't seem to have any effect... Thanks all, Alex -- Alex Bovey Web Developer | Alex Bovey Consultancy Ltd Registered in England Wales no. 6471391 | VAT no. 934 8959 65 al...@bovey.co.uk javascript: | t 0844 567 8995 | m 07828 649386 | f 0870 288 9533 PHP | CakePHP | MySQL | jQuery | HTML5 | CSS3 | Drupal | Wordpress | Hosting -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups CakePHP group. To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscr...@googlegroups.com. To post to this group, send email to cake-php@googlegroups.com. Visit this group at http://groups.google.com/group/cake-php?hl=en. For more options, visit https://groups.google.com/groups/opt_out.