library/Garp/Model/Behavior/Authorable.php
public function beforeFetch(array &$args) {
        $model = $args[0];
        $select = &$args[1];
        if (!$model->isCmsContext()) {
            return;
        }
        if (!Garp_Auth::getInstance()->isAllowed(get_class($model), 'fetch')
            && Garp_Auth::getInstance()->isAllowed(get_class($model), 'fetch_own')
        ) {
            $currentUserData = Garp_Auth::getInstance()->getUserData();
            $currentUserId   = $currentUserData['id'];
            $select->where(self::_AUTHOR_COLUMN . ' = ?', $currentUserId);
        }
    }
public function beforeFetch(array &$args) {
        $model = $args[0];
        $select = &$args[1];
        if (!$model->isCmsContext()) {
            return;
        }
        if (!Garp_Auth::getInstance()->isAllowed(get_class($model), 'fetch')
            && Garp_Auth::getInstance()->isAllowed(get_class($model), 'fetch_own')
        ) {
            $currentUserData = Garp_Auth::getInstance()->getUserData();
            $currentUserId   = $currentUserData['id'];
            $select->where(self::_AUTHOR_COLUMN . ' = ?', $currentUserId);
        }
    }
public function beforeFetch ( array & $ args ) { $ model = $ args [ 0 ] ; $ select = & $ args [ 1 ] ; if ( ! $ model -> isCmsContext ( ) ) { return ; } if ( ! Garp_Auth :: getInstance ( ) -> isAllowed ( get_class ( $ model ) , 'fetch' ) && Garp_Auth :: getInstance ( ) -> isAllowed ( get_class ( $ model ) , 'fetch_own' ) ) { $ currentUserData = Garp_Auth :: getInstance ( ) -> getUserData ( ) ; $ currentUserId = $ currentUserData [ 'id' ] ; $ select -> where ( self :: _AUTHOR_COLUMN . ' = ?' , $ currentUserId ) ; } }
Before fetch callback.

@param array $args
@return void
Before fetch callback .