Not signed in (Sign In)
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthoralake
    • CommentTimeJul 3rd 2008
     

    Regarding this function in AkActionController: function _authenticationRequest($realm) { header('WWW-Authenticate: Basic realm="' . str_replace('"','',$realm) . '"');

        if(method_exists($this, 'access_denied')){
            $this->access_denied();
        }else{
            header('HTTP/1.0 401 Unauthorized');
            echo "HTTP Basic: Access denied.\n";
            exit;
        }
    }
    

    I added the following in my project's ApplicationController:

    function access_denied() {
        echo "test of application_controller:access_denied";
        exit;
    }
    

    I then executed my project (which includes the Admin plugin) and entered an invalid password. The message displayed is the one from AkActionController, indicating to me that <code>if(method_exists($this, 'access_denied'))</code> returned a false value.

    What might I have done wrong, please?

    •  
      CommentAuthorfrancois
    • CommentTimeJul 3rd 2008
     
    Hi Alake,

    Are you sure that you can use the "echo" php method in a controller ? I have never seen that. I think, it will be better if you use a $this->renderText('Error XXXXXXX') in your controller.
    • CommentAuthoroisucf
    • CommentTimeJul 7th 2008
     
    I've seen something related to this too. I opened the ticket here: http://trac.akelos.org/ticket/187

    I messed around this the same section of code. Never got anywhere with it.
Add your comments
    Username Password
  • Format comments as