Brian,
Right that makes perfect sense and it keeps better aligned with the
routing hierarchy (controller/action/etc..). It didn't make sense to
have the username at the top from an application perspective, although
I guess it doesn't really matter.
Still working out the apache setup and server config to be able to set
these up on the fly. Any tips in that department?
On Mar 8, 12:24 pm, "Brian French" <[EMAIL PROTECTED]>
wrote:
> If you want the address bar to always display something like
> phirschybar.cakephp.org then you dont have to touch any of the apache
> settings from the default ones in cake.
>
> all you have to do is in your app_controller -> beforefilter() do the
> following:
> $this->Session->write('Username',array_shift(explode('.',
> $_SERVER['HTTP_HOST'])));
>
> then your url can look like username.domain.com/controller/action
>
> On Mar 7, 5:52 am, "phirschybar" <[EMAIL PROTECTED]> wrote:
>
> > Brian, is this after you did your apache setup?
>
> > On Mar 6, 2:01 pm, "Brian French" <[EMAIL PROTECTED]>
> > wrote:
>
> > > I'm dealing with his now. the way i have figured it out is to check
> > > the domain in the app_controller.php's beforeFilter() method. Then
> > > look up that user info based on the domain and save the user's info in
> > > the session. Then in your other controllers you do:
>
> > > $this->model->findAll("model.user_id='".$this->Session-
>
> > > >read('User.id')."'");
>
> > > There may be a better way, but this seems to work the best for me.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---