Hi Tim,
I added it, but it doesnt change anything. Anyway, how is the
loginRedirect handled usually? Is it, like I assume, $this-
>redirect($this->Auth->loginRedirect()) within my login method?
Arne
On 5 Feb., 22:52, Tim W <[EMAIL PROTECTED]> wrote:
> The only thing that comes to mind is that you're missing a line I have
> in my beforeFilter action, your might need something like this
>
> $this->Auth->loginAction = array('controller' => 'users', 'action' =>
> 'login');
>
> If that doesn't work you'll have me stumped, someone with more than 2
> days experience with auth might have to help!
>
> On Feb 6, 10:48 am, Arne-Kolja Bachstein <[EMAIL PROTECTED]> wrote:
>
> > Hi Tim,
>
> > here it is:
>
> > ---
> > function beforeFilter()
> > {
> > Security::setHash('md5');
> > $this->Auth->authorize = 'controller';
> > $this->Auth->logoutRedirect = '/';
> > $this->Auth->loginRedirect = array('controller' => 'pages',
> > 'action'
> > => 'home'); // already tried to set this to another location
> > $this->Auth->loginError = 'Die eingegebenen Daten sind
> > ungültig.
> > Bitte überprüfen Sie ggfs. die Schreibweise.';
>
> > if ($this->isAuthorized())
> > {
> > if ($this->Session->read('authenticated') != 1)
> > {
> > $this->prepareUser($this->Auth->user());
> > }
>
> > $this->set('user', $this->Session->read('user'));
> > $this->set('authenticated',
> > $this->Session->read('authenticated'));
> > $this->set('profiles_menuitems',
> > $this->Session->read('profiles_menuitems'));
>
> > $this->set('is_admin', $this->isAdmin());
>
> > $this->prepareSubmenu();
> > }
> > else
> > {
> > $this->Session->delete('user');
> > $this->Session->delete('authenticated');
> > $this->Session->delete('profiles_menuitems');
> > }
> > }
> > ---
>
> > Best regards
>
> > Arne
>
> > On 5 Feb., 22:07, Tim W <[EMAIL PROTECTED]> wrote:
>
> > > Can you post your AppController beforeFilter method?
>
> > > On Feb 6, 9:55 am, Arne-Kolja Bachstein <[EMAIL PROTECTED]> wrote:
>
> > > > Hi there,
>
> > > > I've got a slight problem with my Auth component atm. It always
> > > > redirects me to a specific but really weird URL when successfully
> > > > logging in. The URL is the path to one of the images used by Thickbox
> > > > (a jQuery script), so it results in the following:
>
> > > > ---
> > > > Missing Method in UsersController
> > > > Error: The action images is not defined in controller UsersController
> > > > Error: Create UsersController::images() in file: app/controllers/
> > > > users_controller.php.
> > > > <?php
> > > > class UsersController extends AppController {
> > > > var $name = 'Users';
> > > > function images() {
> > > > }}
>
> > > > ?>
> > > > Notice: If you want to customize this error message, create app/views/
> > > > errors/missing_action.ctp.
> > > > ---
>
> > > > The URL that's called is always the same: /users/images/
> > > > loadingAnimation.gif
>
> > > > I cannot explain this behavior, as the whole site doesnt contain any
> > > > link to this file except directly from the JS file that's included
> > > > using $javascript->link().
>
> > > > It also doesnt matter where I am trying to connect a redirect call. Be
> > > > it from within /users/login or by setting $this->Auth->loginRedirect,
> > > > it always results in my redirect being overriden and the user
> > > > redirected to the image path.
>
> > > > Does anyone know something about this problem?
>
> > > > Best regards
>
> > > > Arne
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---