(whoops, did a reply to author. I'll post again here)

The DAuth component is loaded in my appcontroller and doesn't work.

On Mar 10, 2:47 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> you need the dAuth component in your appcontroller to do that.  (like
> i said in that comment)
> if you include the component, and change the code back to what i
> posted, it should work.
>
> On Mar 10, 2:24 pm, "Hubbo" <[EMAIL PROTECTED]> wrote:
>
> > I'm using dAuth and want a login form that is accessible on all pages
> > on the site. Following Dieter's advice in comment 53 
> > onhttp://bakery.cakephp.org/articles/view/147mybeforeFilter() in
> > AppController now looks like this:
>
> >         function beforeFilter()
> >         {
> >                 $error = '';
> >                 $this->DAuth->newSalt();
> >                 $this->set('error', $error);
> >                 $this->set('allowcleartext', $this->DAuth->allowClearText);
> >         }
>
> > By using this solution I get this error message:
> > Fatal error: Call to a member function set() on a non-object in /
> > DEVELOPMENT/app/controllers/components/d_auth.php on line 350
>
> > So I changed newSalt() in the dAuthComponent to return the salt value
> > instead:
>
> > function newSalt()
> >         {
> >                 $salt = crc32(time());
> >                 //$this->controller->set('special_sauce',$salt);
> >                 $this->Session->write('salt', $salt);
>
> >                 return $salt;
> >         }
>
> > and beforeFilter() now looks like this:
>
> >         function beforeFilter()
> >         {
> >                 $error = '';
> >                 $salt = $this->DAuth->newSalt();
> >                 $this->set('special_sauce', $salt);
> >                 $this->set('error', $error);
> >                 $this->set('allowcleartext', $this->DAuth->allowClearText);
> >         }
>
> > But by using this method I end up with a credentials mismatch error. I
> > can't figure out what the problem is. Any advice would be great!
>
> > //Miche


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

Reply via email to