Auth - 2 logged in models simultaneously

2011-11-13 Thread wudu
I have Users and Admins models. For various reasons I don't want to
merge them and use role/type field. Is it possible to use Auth
component so that Admin and User can both be logged in at the same
time? I'm using cakephp 2.0

-- 
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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php


Re: How-to URL modification

2011-11-13 Thread wudu
In your users controller (cake 2.0):
function view($id = null) { if (!empty($this-request-
params['userid'])) {
$id = $this-request-params['userid']; }
...}
In your routes.php:Router::connect('/:userid',  array('controller' =
'users', 'action' = 'view'),   array('userid' = '[0-9]+'));

If userid can be username (eg: contain non-numbers) you will have to
modify array('userid' = '[0-9]+') to account for that
On Nov 13, 2:02 pm, Sushil Gupta desus...@gmail.com wrote:
 Hi! I'm a CakePhp beginner. In my app, users can view their details 
 from,http://myapp/users/view/userid. But I what I want is,http://myapp/userid.
 How do I do this?

-- 
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
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php