小编use*_*124的帖子

Cakephp $ this-> request-> params ['pass'] [0]是什么意思?

嗨,我在这行代码中需要帮助,我已经在我找到的文档中搜索$this->request->params['pass'][0]但是我无法理解它的用途是什么

什么$this->request->params['pass'][0]意思?

有人可以帮助我吗?

php cakephp cakephp-2.0

5
推荐指数
1
解决办法
5312
查看次数

CakePHP帮助博客教程 - 简单认证和授权应用程序

我需要CakePHP中的帮助 - 简单身份验证和授权应用程序教程

public function isAuthorized($user) {
    // All registered users can add posts
    if ($this->action === 'add') {
        return true;
    }

    // The owner of a post can edit and delete it
    if (in_array($this->action, array('edit', 'delete'))) {
        $postId = $this->request->params['pass'][0];
        if ($this->Post->isOwnedBy($postId, $user['id'])) {
            return true;
        }
    }

    return parent::isAuthorized($user);
}
Run Code Online (Sandbox Code Playgroud)

这部分我不知道这意味着什么,我已经搜索谷歌但我没有找到

$this->Post->isOwnedBy($postId, $user['id'])
Run Code Online (Sandbox Code Playgroud)

php authentication cakephp cakephp-2.0

0
推荐指数
1
解决办法
336
查看次数

标签 统计

cakephp ×2

cakephp-2.0 ×2

php ×2

authentication ×1