-1

I am a beginner in CakePHP and am working on an existing CakePHP site.

Scenario: is whenever I try to access a page directly through URL, it lands on Login page.

For instance this is my register page. It has a submit button. When I click this submit button it lands on login page and sets the flash message to 'registered successfully'. I wouldn't want that. What I expected was a redirect to some other page.

In register() function of the respective controller I found this code, which is responsible for the redirection to login page:

else {
    $this->Session->setFlashMessage(__('You have registered successfully!! 
                                        An e-mail has been sent for activation. 
                                        Please check!') , 'success');
    $redirect_url = Router::url(array(
            'controller' => 'users',
            'action' => 'login'
        ) , true);
    }

When I changed the redirection URL to the new page where i want to redirect like

'controller' => 'new_controller',
'action' => 'index'

.. it still lands on login page!

What am I doing wrong here?

tereško
  • 58,060
  • 25
  • 98
  • 150

1 Answers1

0

This is an issue of whatever application written using CakePHP you are trying to set up. authorizationAllowedContollerActions is not a configuration setting of the CakePHP core but of the unnamed application you try to use.

So either provide all required information (related code, CakePHP Version, name of the app you try to use) or ask the author of the code you try to use for support.

floriank
  • 25,546
  • 9
  • 42
  • 66