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

  • Home
  • SEARCH
  • 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 7711079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T01:17:09+00:00 2026-06-01T01:17:09+00:00

I am trying to implement CKEditor in my CakePHP app admin section with a

  • 0

I am trying to implement CKEditor in my CakePHP app admin section with a third-party file manager (http://labs.corefive.com/2009/10/30/an-open-file-manager-for-ckeditor-3-0/).

Everything has been setup nicely, including uploading fotos, etc. However, I have one BIG issue I cant seem to figure out how to fix.

In the filemanager.config.php file there is the auth() function which prevent unauthorized use of the FileManager. I am not sure how to implement this function as to ONLY allow my app’s administrator to use. In my user’s table I use group_id to categorize users and the administrators group_id is 1.

I’ve thought about _SESSION, but I have not been able to create a solution.

/**
*   Check if user is authorized
*
*   @return boolean true is access granted, false if no access
*/
function auth() {
    // You can insert your own code over here to check if the user is authorized.
    // If you use a session variable, you've got to start the session first                                               
    session_start();
    if ($_SESSION['User.group_id'] == 1){
        return true;
    }else{
        return false;
    }
}

Thank you in advance for you help.

=====================================================================================

EDIT

I had the whole setup wrong

  1. I was using my CakePHP session as Database, I’ve changed it to php.
  2. And my $_SESSION code was wrong

I was able to fix it per the following:

function auth() {
    session_name("CAKEPHP");
    session_start();
    if(isset($_SESSION['Auth']['User']) )
    {
        if($_SESSION['Auth']['User']['group_id'] == 1)
        {
            return true;
        }
    }
    return false;
}

It works great as such.

====================================================================================

  • 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-01T01:17:10+00:00Added an answer on June 1, 2026 at 1:17 am

    The code you show is from fceditor? If you set up auth in CakePHP correctly and have not modified the default session key your user data will be in $_SESSIOn[‘Auth’][‘User’].

    In CakePHP do not use $_SESSION directly, use the Session component.

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

Sidebar

Related Questions

Trying to implement the excellent jQuery bidirectional infite scroll as explained here: http://www.bennadel.com/blog/1803-Creating-A-Bidirectional-Infinite-Scroll-Page-With-jQuery-And-ColdFusion.htm For
Trying to implement this gallery on my website. http://coffeescripter.com/code/ad-gallery/ It is noted in the
Im trying to implement this code: http://wcf.codeplex.com/wikipage?title=Getting%20started:%20Building%20a%20simple%20web%20api and want to add it to my
I am trying to implement a timestamp example plugin given in the www.ckeditor.com. But
trying to implement a dialog-box style behaviour using a separate div section with all
Trying to implement a UITableView of names similar to the built-in Contacts iPhone app
Am trying to implement a generic way for reading sections from a config file.
While trying to implement an MVC file upload example on Scott Hanselman's blog. I
Im trying to implement GA in my android app. When i call 'GoogleAnalyticsTracker.getInstance()' i
I'm trying implement Data Annotation to my Linq to SQL objects. The .dbml file

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.