$this->params["styre"] should of course be $this->params["admin"] (or
whichever admin route prefix you use).

On Oct 4, 9:52 pm, "twinkletoes" <[EMAIL PROTECTED]> wrote:
> Thanks for a pointer in the right direction, nate :)
>
> I got error messages when trying your solution, but they were fixed
> easily by doing a few additions:
>
> public function beforeFilter ()
> {
>         if (isset($this->params["styre"]))
>         {
>             $this->Security->requireLogin(
>                 '*',
>                 array(
>                         'users' => array(
>                                 "risdriv" => "phey3oi"),
>                         'type' => 'basic'));
>         }
>
> } // end of function beforeFilterOn Sep 14, 11:04 pm, "nate" <[EMAIL 
> PROTECTED]> wrote:
> [...]>You can activate it by doing the following:
>
> > class AppController extends Controller {
> >     var $components = array("Security");
>
> >     function beforeFilter( ) {
> >         if ($this->params["admin"]) {
> >             $this->Security->requireLogin("*", array('users' =>
> > array("admin" => "password")));
> >         }
> >     }[...]


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

Reply via email to