Changelogs: AutoLogin v3.4

A new version of AutoLogin has been released, version 3.4. Please download the new tag or view the documentation. If you have any questions, be sure to send me an email or comment on this post. If you run into any problems, be sure to report an issue on the Github repository.

Version: 3.4
Tested On: PHP 5.3, CakePHP 2.0.5
Requires: PHP 5.2, CakePHP 2.0
Commit Hash: 29d38c3970644239cdf7dfa560dca466aa57fd61
Changes:

  • A boolean setting "active" can be toggled to force an early exit of the script
  • A boolean setting "redirect" can force a redirect after a successful login
  • A boolean setting "requirePrompt" allows you to determine whether a form checkbox is needed
  • Fixed a bug where AutoLogin shouldn't be triggered for POST or PUT requests
  • Moved $cookieName and $expires properties to $settings (backwards compatible support)
  • Updated debug() to log to file if no debug email was defined
  • Settings can now be defined dynamically via Configure::write('AutoLogin')
  • Test cases have been added

Thanks to dereuromark for the new features and test cases! Be sure to also check out his blog post on the AutoLogin changes.

Changelogs: AutoLogin v3.3

A new version of AutoLogin has been released, version 3.3. Please download the new tag or view the documentation. If you have any questions, be sure to send me an email or comment on this post. If you run into any problems, be sure to report an issue on the Github repository.

Version: 3.3
Tested On: PHP 5.3, CakePHP 2.0.5
Requires: PHP 5.2, CakePHP 2.0
Commit Hash: a9a4c11e3055f3ec569af77b3899f7dd4d485632
Changes:

  • Fixed a problem where Auth would redirect before startup() has happened
  • Fixed a bug with plugin name inflection (Issue #14)
  • Updated code to support dynamic User and AutoLogin configuration

Changelogs: AutoLogin v3.2

A new version of AutoLogin has been released, version 3.2. Please download the new tag or view the documentation. If you have any questions, be sure to send me an email or comment on this post. If you run into any problems, be sure to report an issue on the Github repository.

Version: 3.2
Tested On: PHP 5.3, CakePHP 2.0.3
Requires: PHP 5.2, CakePHP 2.0
Commit Hash: e0cedb439ee7e5789242cae8ecc04d07b0397a3f
Changes:

  • Added a model setting to the $settings property
  • Fixed a bug where Auth::user() would not return the full row data
  • Fixed a bug where the action would be empty (defaults to login)
  • Merged the username and password values from $fields into $settings
  • Removed the $fields property
  • Removed model detection via Auth::$authenticate in favor of the $settings model value
  • Updated the readme with information regarding Suhosin

Codebase Upgrades: Upgrading AutoLogin v2.2 to v3

The AutoLogin component has upgraded major versions from 2.2 (CakePHP 1.3) to 3.0 (CakePHP 2), now 3.1. Since this is not a backwards compatible change, the 2.0 version can only be used in CakePHP 2. During the conversion process, many things had to change to support the new AuthComponent.

No more automatic username/password field detection

Previously AutoLogin would detect the custom name of your username and password fields by accessing Auth::$fields. Since that property has been removed in favor of Auth::$authenticate, the AutoLogin component received a new property called $fields which mimicked what the Auth's version did. I didn't want to magically guess what the username and password is from Auth::$authenticate and be wrong, so I made it an optional property (you should only need to change it if you are using custom fields).

$this->AutoLogin->fields = array('username' => 'user', 'password' => 'pass');

Seeing as how that was the only major change that may require backwards support, the following minor changes have also occurred: CakeRequest has been implemented anywhere $params were being referenced, the user model is detected via Auth::$authenticate (all first, then Form) in place of the deprecated Auth::$userModel and cookie support has been implemented for localhost environments (may not work in all environments).

If you have any questions, or run into any problems, let me know!