Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8429301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:17:52+00:00 2026-06-10T05:17:52+00:00

I am upgrading an app from CakePHP 1.3 to CakePHP 2.2.1 . We are

  • 0

I am upgrading an app from CakePHP 1.3 to CakePHP 2.2.1 .

We are implementing ACL and in AppController I saw

if (isset($this->Auth)) {
            if ($this->use_acl) {
                $this->Auth->authorize = 'actions';
            }

As a variable declaration I have already made changes to the following :

var $components = array(
        'Auth' => array(
            'authenticate' => array(
                'Form' => array(
                'fields' => array('username' => 'email', 'password' => 'password')
                )
            ),
            'loginAction' => array(
                'admin' => false, 'prefix' => false, 'controller' => 'users', 
                'action' => 'login')
        ),
        'Session', 'Facebook.Connect');

does it still require me to keep:

$this->Auth->loginAction = array('admin' => false, 'prefix' => false, 'controller' => 'users', 'action' => 'login');

The code work may sound ugly but, that is how upgrades are! 😉

Also, can I use the $this->Auth-> ‘auth properties’ in 2.2.1 as it was possible in 1.3 ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T05:17:53+00:00Added an answer on June 10, 2026 at 5:17 am

    As usual, the best place to get started with questions like this is the manual. Then, post the results of your tests rather than your code and a broad question.

    That said, the first block of code you posted looks like a custom variable on your end $this->use_acl. I’ve never seen that used in CakePHP, so there’s some flag your setting in your app to use ‘actions’.

    The second block of code looks pretty standard. It should work. Yes, you still need to specify a login action so that when a user tries to navigate to a page that is protected, then he/she will be redirected to the login. That said, there are differences in the login process as noted in the manual link above. You should take a look at the differences as to when a password is hashed and the login() function itself as they both have changed. The fact you are using ACL shouldn’t matter much as far as Authentication differences between the two version.

    Your last question Also, can I use the $this->Auth-> 'auth properties' in 2.2.1 as it was possible in 1.3 ?, the answer is yes. You should take a look at the AuthComponent.php file in the lib/Cake folder. It’s heavily commented about the information you are asking about here. There are even examples.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm upgrading an app from prototype.js to jquery. I've got this code (prototype.js): var
I am upgrading a cakephp app at my new job from l.1 to 1.2.
I set myself the task of upgrading my app from rails 3.1 to rails
In my app, I am upgrading from Cocos2D version 1.10->2.0-rc0a. So I did everything
I'm upgrading an ASP.NET 4.0 app from: Windows Server 2003 and IIS 6 to:
I've been playing around with upgrading from an iPhone app to a Universal application,
I'm upgrading my app from 3.0.9 to 3.2.1 (ruby 1.9.3-p0, rvm, bundler) and one
I'm upgrading an app from rails 3.1.1 to rails 3.2. I had to update
I'm upgrading an app from Rails 2.3.9 to Rails 3.1. The app has a
I'm in the process of upgrading my app from Rails 3.0 to Rails 3.1.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.