Pass Parameters To Cuseridentity Base Class

Hi, I created an ADUserIdentity to authenticate via Active Directory.

I set parameters under ‘Components’ array in config/main.php but soon I discovered what wasn’t obvious for me (maybe only for me :P), that that array is for CApplicationComponent based classes.

So my ADUserIdentity doesn’t have a init() method or anything like that.

How could I do to accomodate different interchangeable UserIdentity Classes?

So in config/main.php I would select MySQL or ActiveDirectory and pass parameters to these classes.

Thanks!

Sorry if I misunderstood your intent… Why use Components? Just use params (you have ‘adminEmail’=>‘webmaster@example.com’, already defined in there) add another array


'ldap'		=> array(

					'host'		=> 'serverAD.example.com',

					'port'		=> 389,

					'domain'	=> 'MYDOMAIN',),

And to access it use


$ldapOptions = Yii::app()->params['ldap']