如何更改CakePHP中的登录消息

aya*_*aya 1 authentication cakephp cakephp-1.3

我使用CakePHP 1.3,我想更改此消息:

您无权访问该位置.

到(例如):

哦对不起

该代码中显示消息:

echo $ this-> Session-> flash('auth');

我将app_controller更改为

class AppController extends Controller {

var $components = array('Auth', 'Session', 'Acl');

function beforeFilter() {
    $this->Auth->authorize = 'actions';
    $this->Auth->autoRedirect = false;
    if ($this->params['controller'] == 'pages') {
        $this->Auth->allow('*');
    }
    $this->Auth->allow('pages');
    $this->Auth->loginError = "This message shows up when the wrong credentials are used";    
    $this->Auth->authError = "This error shows up with the user tries to access a part of the website that is protected.";

}
Run Code Online (Sandbox Code Playgroud)

}

但我面对同样的信息.

Grz*_*tyl 5

这条路:

$this->Auth->loginError = "This message shows up when the wrong credentials are used";  
$this->Auth->authError = "This error shows up with the user tries to access a part of the website that is protected.";
Run Code Online (Sandbox Code Playgroud)