library/Garp/Content/Manager.php
protected function _itemBelongsToUser($data, $where = false) {
        $userData = Garp_Auth::getInstance()->getUserData();
        $userId = $userData['id'];
        if (!array_key_exists('author_id', $data)) {
            if (!$where) {
                return false;
            }
            // fetch the record based on the given WHERE clause
            $row = $this->_model->fetchRow($where);
            if (!$row || !$row->author_id) {
                return false;
            }
            $data = $row->toArray();
        }
        return $userId == $data['author_id'];
    }
protected function _itemBelongsToUser($data, $where = false) {
        $userData = Garp_Auth::getInstance()->getUserData();
        $userId = $userData['id'];
        if (!array_key_exists('author_id', $data)) {
            if (!$where) {
                return false;
            }
            // fetch the record based on the given WHERE clause
            $row = $this->_model->fetchRow($where);
            if (!$row || !$row->author_id) {
                return false;
            }
            $data = $row->toArray();
        }
        return $userId == $data['author_id'];
    }
protected function _itemBelongsToUser ( $ data , $ where = false ) { $ userData = Garp_Auth :: getInstance ( ) -> getUserData ( ) ; $ userId = $ userData [ 'id' ] ; if ( ! array_key_exists ( 'author_id' , $ data ) ) { if ( ! $ where ) { return false ; } // fetch the record based on the given WHERE clause $ row = $ this -> _model -> fetchRow ( $ where ) ; if ( ! $ row || ! $ row -> author_id ) { return false ; } $ data = $ row -> toArray ( ) ; } return $ userId == $ data [ 'author_id' ] ; }
Check a record belongs to the currently logged in user.
This check is based on the author_id column.

@param array $data The record data. Primary key must be present here.
@param string $where A WHERE clause to find the record
@return bool
Check a record belongs to the currently logged in user . This check is based on the author_id column .