1
Hi, I’m trying to log in with an LDAP connection on symfony 1.4. I blew the connection variables, ldap_connect and ldap_bind and they return me True, but I can’t redirect the user into my system:
if ($request->isMethod('post'))
{
$this->form->bind($request->getParameter('signin'));
$login = $request->getParameter('signin_username');
$pass = $request->getParameter('signin_password');
$host = '192.168.1.xxx';
$port = 389;
$link = ldap_connect($host, $port);
$bind = @ldap_bind($link, $login, $pass);
if($link)
{
echo 'link ok ';
if($bind){
echo 'bind ok';
// $signinUrl = sfConfig::get('app_sf_guard_plugin_success_signin_url', $user->getReferer($request->getReferer()));
// return $this->redirect('' != $signinUrl ? $signinUrl : '@homepage');
header('location:@homepage');
}
else{
echo 'close ok';
ldap_close($link);
}
}