News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Chris Hartjes' Blog:
Don't Fear The Command Line Using CakePHP Shells
September 05, 2008 @ 07:53:01

Chris Hartjes has a new post to his blog today focusing on using a bit of the CakePHP framework's functionality from the command line.

I'm porting a spaghetti-PHP application over to using CakePHP I am moving their existing authorization system over to using Cake's Auth component. Of course, they are storing all their passwords in plaintext in the user account table, so I needed an easy way to convert all the existing passwords over to be encrypted using the same hash that Auth would use.

With the help of the shells and tasks that the framework makes availiable, he's able to make a simple 24 line class (EncryptPasswordShell) that extends the Shell object and loops through the data to push it back into the database in the correct password format.

0 comments voice your opinion now!
cakephp commandline shell task tutorial convert password


blog comments powered by Disqus

Similar Posts

Zend Developer Zone: AJAX Chat Tutorial Part 7 : Usability Improvements

PHPro.org: Tutorial - Reciprocal Links

CodePoets.co.uk: How to use PHP and PEAR MDB2 (Tutorial)

SitePoint PHP Blog: Integrating Polymer/Dart and Symfony Part 2

PHPBuilder.com: PHP Dependency Injection Creates More Maintainable Code


Community Events

Don't see your event here?
Let us know!


laravel laravel5 security voicesoftheelephpant interview introduction version community library release threedevsandamaybe opinion symfony podcast extension language api framework series unittest

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework