public function userPendingItems(Member $user)
    {
        // Don't restrict anything for ADMIN users
        $userInstances = DataList::create(WorkflowInstance::class)
            ->where('"WorkflowStatus" != \'Complete\'')
            ->sort('LastEdited DESC');

        if (Permission::checkMember($user, 'ADMIN')) {
            return $userInstances;
        }
        $instances = new ArrayList();
        foreach ($userInstances as $inst) {
            $instToArray = $inst->getAssignedMembers();
            if (!count($instToArray)>0 || !in_array($user->ID, $instToArray->column())) {
                continue;
            }
            $instances->push($inst);
        }

        return $instances;
    }
public function userPendingItems(Member $user)
    {
        // Don't restrict anything for ADMIN users
        $userInstances = DataList::create(WorkflowInstance::class)
            ->where('"WorkflowStatus" != \'Complete\'')
            ->sort('LastEdited DESC');

        if (Permission::checkMember($user, 'ADMIN')) {
            return $userInstances;
        }
        $instances = new ArrayList();
        foreach ($userInstances as $inst) {
            $instToArray = $inst->getAssignedMembers();
            if (!count($instToArray)>0 || !in_array($user->ID, $instToArray->column())) {
                continue;
            }
            $instances->push($inst);
        }

        return $instances;
    }
public function userPendingItems ( Member $ user ) { // Don't restrict anything for ADMIN users $ userInstances = DataList :: create ( WorkflowInstance :: class ) -> where ( '"WorkflowStatus" != \'Complete\'' ) -> sort ( 'LastEdited DESC' ) ; if ( Permission :: checkMember ( $ user , 'ADMIN' ) ) { return $ userInstances ; } $ instances = new ArrayList ( ) ; foreach ( $ userInstances as $ inst ) { $ instToArray = $ inst -> getAssignedMembers ( ) ; if ( ! count ( $ instToArray ) > 0 || ! in_array ( $ user -> ID , $ instToArray -> column ( ) ) ) { continue ; } $ instances -> push ( $ inst ) ; } return $ instances ; }
Get items that the passed-in user has awaiting for them to action

@param Member $member
@return DataList
Get items that the passed - in user has awaiting for them to action