Hi,

I'm going to create an authentication plugin for Cake 1.2 (login/
logout/registration/etc.).

I would like to make it a bit customizable using a sort of
configuration (i.e. use captcha, users model, etc.).

Which is the best way to achieve this?

A plugin doesn't have a bootstrap.php file that is loaded at startup.
As far as I have understood, the only file where I can load a kind of
"global plugin configuration" is the  plugin AppController class file.
Maybe using a code like the following:

// /app/plugins/auth/auth_app_controller.php:
<?php

require_once(dirname(__FILE__) . DS . 'config' . DS .
'bootstrap.php');

class AuthAppController extends AppController {
//...
}
?>

// /app/plugins/auth/config/bootstrap.php:
<?php
Configure::write(
        'AuthPlugin', array('use_captcha' => true,
                            'require_verification' => false,
                            'users_model', 'users')
        );
?>

Is there a better way? Maybe using some constant instead of the
Configure class. Is there another file that is loaded automagically by
CakePHP when a plugin is loaded?

Thank you for any suggestion.

Sincerely,
Filippo Toso

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to