Blog Home


Clearing User Session Data

Make changes in user status take effect immediately

Adding Users to User Groups

A look at various methods for adding MODX users to user groups in code

Diagnosing Revolution Permission Problems

A simple utility snippet to test user permissions

Template Report with Pagetitles

Add pagetitles to the template report created in the previous Blog article.

Template Report

A snippet that will create a report giving the number of pages that use each template, with separate data on published and unpublished resources.

Dynamic Search Criteria for getResources

Using a small utility snippet to create complex search criteria for the &where property of getResources or pdoResources or any other snippet that uses a &where property.

Using Parameterized Prepared Statements in a Class

Binding statement parameters to class variables so they can be used anywhere in the class

Using Parameterized Prepared Statements to Retrieve Data

Using prepared statements is good, but calling prepare() over and over in a loop is bad. Here's how to avoid it.

Using fromArray() to Write Raw Values to the DB

How to write raw values to the database with the fromArray() method.

Bypassing MODX to Write Directly to the Database

A PDO method for bypassing the conversions made by the set() method.