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 8444945
In Process

The Archive Base Latest Questions

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

I want to build an application with CakePHP 2.1 where users are only required

  • 0

I want to build an application with CakePHP 2.1 where users are only required to login to the backend (with a custom prefix) and not the front end.

I know it would be possible to do this on a per-action basis with $this->Auth->allow(), but I want to do this based on the prefix.

  • 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-10T09:31:53+00:00Added an answer on June 10, 2026 at 9:31 am

    To archieve this, you can follow the “standard” steps in the Authentification Tutorial and just have to add a little piece in the beforeFilter()-callback in your AppController.

    function beforeFilter() {
      if(isset($this->Auth)) {
        if(isset($this->params['admin']) && $this->params['admin']) {
          $this->Auth->allow('admin_login'); // allow backend login only
        } else {
          $this->Auth->allow(); // allow everything in frontend
        }
      }
    }
    

    This will allow users to do everything in your application except all actions with the prefix admin. The only action allowed is admin_login which probably resides on some kind of UsersController to make it possible for backend users to log in.

    Be careful to define this for each prefix that needs authentification if you use multiple prefixes.

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

Sidebar

Related Questions

I am using cakephp framework to build my application. I want that, whenever a
I want to build an android application, this application allow the users to answer
I want to build a Facebook application that will be available only to those
I want to build an application on tomcat server where user can login and
I want to build an application that routes all network traffic (not just HTTP)
I want to build an application that enables users to schedule emails to send
hello i want to build silverlight application for wince6.0. im not getting whether we
I want to build Android application. My target devices is tablets (not smartphones). Today
I want to build an application using Rails 3.0.1 but do not want to
I want to build flash application that can detect the user eyes color and

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.