redirecting with ACL

2009-04-06 Thread atta

hi
 how can i check for group id and redirect after login to admin site
and if it was a member then public member area.
I have same login section for both Admin and members.
I am trying to do something like this.

if($this-Auth-user('group_id')== 5){
$this-Auth-loginRedirect = array('controller'='newsletters',
'action'='index'); }
else{
$this-Auth-loginRedirect = array('controller'='Pages',
'action'='display'); }


but no success.
Any help please..

atta ur rehman

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



Re: redirecting with ACL

2009-04-06 Thread atta

i have solved this issue like this
if($this-Auth-user('group_id')== 5){
$this-redirect(array('controller'='admin/categories',
'action'='add'));
}
else if($this-Auth-user('group_id')== 6){
$this-redirect(array('controller'='Pages', 'action'='display'));
}

but it more looks like a hack as its not telling $this-Auth-
loginRedirect anyting.

Atta

On Apr 6, 4:50 pm, atta muh.a...@gmail.com wrote:
 hi
  how can i check for group id andredirectafter login to admin site
 and if it was a member then public member area.
 I have same login section for both Admin and members.
 I am trying to do something like this.

 if($this-Auth-user('group_id')== 5){
         $this-Auth-loginRedirect = array('controller'='newsletters',
 'action'='index'); }
 else{
 $this-Auth-loginRedirect = array('controller'='Pages',
 'action'='display'); }

 but no success.
 Any help please..

 attaur rehman
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---