an add page redirects to other page holding some parameters

2012-03-01 Thread driss bounouar
I have two models person and subordinate and I have the relationship 
 person has many subordinate what I want to do is that when I add the 
person when I click the submit button I will be redirected to add 
subordinate to that exact person I don't want a combox to choose between 
people ??

How could I do that ? and more specifically how could I hold the person Id 
and save it in the foreign key of subordinate ??

 I hope you understand what I mean

thank you all

-- 
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: Auth component and admin routing confusion

2011-11-11 Thread driss bounouar
Thank you for helping but I'm sorry I can't use your help right now I've
lost my laptop which  contain everything :(  bad luck I need to get a new
one then try the things You said thank you any way

On Fri, Nov 11, 2011 at 10:15 AM, phpMagpie  wrote:

> Not sure how an unsuccessful login (you say you stay on login page
> with error message) and creating a different login for admins and non-
> admins are related.
>
> If auth replies with 'wrong combinisation of username/password' then
> the credentials you supplied were wrong, not matter which login form
> you use.
>
> For treating admins and non-admins differently check if an admin
> prefix exists in $this->params and amend your Auth setup accordingly
> (do this in app_controller):
>
> if(isset($this->params['prefix']['admin'])) {
>  $this->Auth->userScope['UserGroup.id'] = 1; // my admin group
>  $this->layout = 'admin'; // use admin layout
>  // other admin related stuff
> }
>
> HTH, Paul.
>
> On Nov 10, 12:33 pm, driss  wrote:
> > Hi
> > I worked a lot with the auth component and the routing but I'm still
> > confused whether the 2 complement or there's ways to work with everyone
> > alone. Here's my case and the problem I always get when working with the
> 2
> > together:
> > I use the auth component and let's say I want to create the backoffice
> for
> > the admin so I add the admin routing
> > the auth component I used like it is I use the table users and everything
> > folowing the book so as predicted when I try to open mysite/admin/users
> it
> > redirects me to my login page in mysite/users/login but entring the right
> > combinisation of username and password doesn't take any were I stay in
> the
> > same login page whitout any flash message telling me wrong combinisation
> of
> > username/password
> > so my question is :can I work with the admin routing alone but must give
> me
> > the login logout actions for the admin??
> > if not how can i work with the 2 ??
> > if there's any pertinent tutorial out there that will help please write
> it
> > ??
> > thank you all
>
> --
> 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
>



-- 
Driss Bounouar
Élève ingénieur d’état à l’École Nationale des Sciences Appliquées d'Agadir
(promotion 2012)
numéro de tel: 0676749213
profil facebook :driss.bounouar <http://www.facebook.com/driss.bounouar>
follow me on Twitter :driss <http://wefollow.com/furiousdr>
Website :http://openmind.isgreat.org <http://openmind.isgreat.org/home>

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