Hi every:
I'm trying to integrate sfGuard with my LDAP. For that I add this lines to my
app.yml file:
/frontend/config/app.yml
all:
sf_guard_plugin:
check_password_callable: [LDAP, checkLDAPPassword]
Then I create a file called LDAP.class.php and put inside /frontend/lib
directory. The method content is this:
class LDAPclass extends sfGuardSecurityUser {
public static function checkLDAPPassword($username, $password) {
$options =
array('account_suffix'=>'@uci.cu','base_dn'=>'DC=uci,DC=cu','domain_controllers'=>array('10.0.0.3','10.0.0.4'));
$ldap = new adLDAP($options);
$authenticated = $ldap->authenticate($username, $password);
if ($authenticated) {
return true;
} else {
return false;
}
}
}
The adLDAP is another class placed also in /frontend/lib directory. When I try
to execute the authentication I get this errors:
Warning: call_user_func_array() [function.call-user-func-array]: First argument
is expected to be a valid callback, 'LDAP::checkLDAPPassword' was given in
D:\Server\www\residencia\plugins\sfGuardPlugin\lib\model\plugin\PluginsfGuardUser.php
on line 79
Warning: Cannot modify header information - headers already sent by (output
started at
D:\Server\www\residencia\plugins\sfGuardPlugin\lib\model\plugin\PluginsfGuardUser.php:79)
in D:\Server\SF\lib\response\sfWebResponse.class.php on line 335
Warning: Cannot modify header information - headers already sent by (output
started at
D:\Server\www\residencia\plugins\sfGuardPlugin\lib\model\plugin\PluginsfGuardUser.php:79)
in D:\Server\SF\lib\response\sfWebResponse.class.php on line 349
Why? What I'm doing wrong?
Cheers and thanks in advance
Ing. Reynier Pérez Mira
Dirección Técnica IP
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony users" 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/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---