If it is true, that's an awefully poor way of doing it. The Cake 1.2
Security component (which you can grab form here:
https://trac.cakephp.org/browser/branches/1.2.x.x/cake/libs/controller/components/security.php
- just drop it in app/controllers/components to replace the Cake 1.1
version) has a requireLogin method, which implements HTTP basic
authentication. You can activate it by doing the following:
class AppController extends Controller {
var $components = array("Security");
function beforeFilter( ) {
if ($this->params["admin"]) {
$this->Security->requireLogin("*", array('users' =>
array("admin" => "password")));
}
}
}
The "*" in the first parameter means to require the login for all
actions. The method also allows you to specify a list of actions to be
protected. You can add as many name/password pairs as you want to the
'users' array. Alternatively, you can use Model::generateList to load
usernames and passwords from a database.
The final version of the 1.2 Security component will also handle HTTP
digest authentication, so you can use md5-hashed passwords as well as
plain text passwords.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---