UPDATE 20100817: rather than using the [php]'admin' => false[/php] part below, check out [php]$this->params['prefix'] = false[/php]. This seems to work for the prefix routing in the 1.3.x series, which has taken the place of admin routing in the older pre-1.3 versions of Cake.
This confused me for a while because I couldn't find appropriate documentation after much searching. Many CakePHP Auth/Acl tutorials show setting a loginAction like this in a controller's beforeFilter:
I'm tinkering with a small CakePHP app and I want to add users but allow them to authenticate against my phpBB3 forum credentials. I found a few attempts and suggestions that didn't work for me and the bridge available in the Bakery isn't wwhat I wanted either.
CakePHP's HABTM (has-and-belongs-to-many) db relationship is quite useful. While playing with a test app, though, I needed to figure out how to establish a table that self-references in a HABTM relationship. Turns out, as this post points out, that it's quite easy. The key is to use an alias in the $hasAndBelongsToMany definition and set its associationForeignKey key to a fictitious identifier.
I needed a way to auto-rotate the password on a regular basis for a public account on an Ajaxplorer server. Since it uses local files for config settings and the passwords are stored in those encrypted, there wasn't a nice easy MySQL query or file edit. So, I ripped apart the admin.php file and forced it to work. Here's my munged version: