July, 2009

29/Jul/09

Using $_SESSION inside CakePHP’s beforeFilter

OK, strange CakePHP bug (feature?) of the day… It seems that you cannot use the Session component (and also $_SESSION) within the beforeFilter() callback. (no comments)

17/Jul/09

CakePHP swap action dynamically

I recently had the need to dynamically swap the action called based on information fetched from the database. To do this, you need to use the beforeFilter callback method. (4 comments)